From 738227edfba3b4de25856912f46d3bd492a2bfd8 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 4 Sep 2025 23:22:13 +0000 Subject: [PATCH 1/2] feat: Azure as a source feat: CMEK support feat: VM disk migration feat: Image Import feat: Machine Image Import feat: Cutover forecast feat: OS capabilities detection feat: Multiple additional supported target details feat: Migration warnings in addition to errors feat: API for extending the time to live (TTL) of a Migrating VM fix: Changed field behavior for an existing field `key` in message `.google.cloud.vmmigration.v1.AwsSourceDetails` to `required` to protect from incorrect input fix: Changed field behavior for an existing field `value` in message `.google.cloud.vmmigration.v1.AwsSourceDetails` to `required` to protect from incorrect input fix: Changed field behavior for an existing field `project` in message `.google.cloud.vmmigration.v1.TargetProject` to `required` to protect from incorrect input docs: Updated comments and descriptions to improve clarity PiperOrigin-RevId: 803163128 Source-Link: https://github.com/googleapis/googleapis/commit/b7cf972f4c4b531c613050b47bdc333199b9bf50 Source-Link: https://github.com/googleapis/googleapis-gen/commit/be7d7818df991d91a07912699e9a8558faf5c66c Copy-Tag: eyJwIjoiVm1NaWdyYXRpb24vLk93bEJvdC55YW1sIiwiaCI6ImJlN2Q3ODE4ZGY5OTFkOTFhMDc5MTI2OTllOWE4NTU4ZmFmNWM2NmMifQ== --- .../Cloud/Vmmigration/V1/Vmmigration.php | Bin 0 -> 62065 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 | 146 + .../VMMigration/V1/AwsSourceDetails/State.php | 74 + .../VMMigration/V1/AwsSourceDetails/Tag.php | 104 + .../VMMigration/V1/AwsSourceDiskDetails.php | 169 + .../V1/AwsSourceDiskDetails/Type.php | 99 + .../VMMigration/V1/AwsSourceVmDetails.php | 217 + .../V1/AwsSourceVmDetails/AwsDiskDetails.php | 138 + .../V1/AwsSourceVmDetails/Firmware.php | 64 + .../Cloud/VMMigration/V1/AwsVmDetails.php | 683 ++ .../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/AzureSourceDetails.php | 314 + .../ClientSecretCredentials.php | 138 + .../V1/AzureSourceDetails/State.php | 74 + .../VMMigration/V1/AzureSourceVmDetails.php | 217 + .../AzureSourceVmDetails/AzureDiskDetails.php | 138 + .../V1/AzureSourceVmDetails/Firmware.php | 64 + .../Cloud/VMMigration/V1/AzureVmDetails.php | 529 ++ .../V1/AzureVmDetails/BootOption.php | 64 + .../VMMigration/V1/AzureVmDetails/Disk.php | 138 + .../V1/AzureVmDetails/OSDescription.php | 173 + .../VMMigration/V1/AzureVmDetails/OSDisk.php | 138 + .../V1/AzureVmDetails/PowerState.php | 99 + .../V1/AzureVmDetails/VmArchitecture.php | 64 + .../Cloud/VMMigration/V1/AzureVmsDetails.php | 67 + .../Cloud/VMMigration/V1/BootConversion.php | 61 + .../Cloud/VMMigration/V1/BootDiskDefaults.php | 241 + .../V1/BootDiskDefaults/DiskImageDefaults.php | 70 + .../VMMigration/V1/CancelCloneJobRequest.php | 81 + .../VMMigration/V1/CancelCloneJobResponse.php | 33 + .../V1/CancelCutoverJobRequest.php | 81 + .../V1/CancelCutoverJobResponse.php | 33 + .../V1/CancelDiskMigrationJobRequest.php | 67 + .../V1/CancelDiskMigrationJobResponse.php | 33 + .../V1/CancelImageImportJobRequest.php | 81 + .../V1/CancelImageImportJobResponse.php | 33 + .../Google/Cloud/VMMigration/V1/CloneJob.php | 403 + .../Cloud/VMMigration/V1/CloneJob/State.php | 100 + .../Google/Cloud/VMMigration/V1/CloneStep.php | 229 + .../V1/ComputeEngineBootOption.php | 61 + .../VMMigration/V1/ComputeEngineDisk.php | 193 + .../VMMigration/V1/ComputeEngineDiskType.php | 76 + .../V1/ComputeEngineDisksTargetDefaults.php | 223 + .../V1/ComputeEngineDisksTargetDetails.php | 143 + .../V1/ComputeEngineLicenseType.php | 61 + .../V1/ComputeEngineNetworkTier.php | 62 + .../V1/ComputeEngineTargetDefaults.php | 906 +++ .../V1/ComputeEngineTargetDetails.php | 890 +++ .../VMMigration/V1/ComputeScheduling.php | 208 + .../ComputeScheduling/OnHostMaintenance.php | 62 + .../V1/ComputeScheduling/RestartType.php | 67 + .../V1/CopyingSourceDiskSnapshotStep.php | 33 + .../VMMigration/V1/CreateCloneJobRequest.php | 237 + .../V1/CreateCutoverJobRequest.php | 237 + .../V1/CreateDatacenterConnectorRequest.php | 252 + .../V1/CreateDiskMigrationJobRequest.php | 252 + .../VMMigration/V1/CreateGroupRequest.php | 237 + .../V1/CreateImageImportRequest.php | 252 + .../V1/CreateMigratingVmRequest.php | 237 + .../VMMigration/V1/CreateSourceRequest.php | 237 + .../V1/CreateTargetProjectRequest.php | 237 + .../V1/CreateUtilizationReportRequest.php | 258 + .../VMMigration/V1/CreatingImageStep.php | 33 + .../V1/CreatingSourceDiskSnapshotStep.php | 33 + .../Cloud/VMMigration/V1/CutoverForecast.php | 77 + .../Cloud/VMMigration/V1/CutoverJob.php | 468 ++ .../Cloud/VMMigration/V1/CutoverJob/State.php | 100 + .../Cloud/VMMigration/V1/CutoverStep.php | 295 + .../Google/Cloud/VMMigration/V1/CycleStep.php | 229 + .../VMMigration/V1/DataDiskImageImport.php | 33 + .../VMMigration/V1/DatacenterConnector.php | 620 ++ .../V1/DatacenterConnector/State.php | 81 + .../V1/DeleteDatacenterConnectorRequest.php | 155 + .../V1/DeleteDiskMigrationJobRequest.php | 81 + .../VMMigration/V1/DeleteGroupRequest.php | 155 + .../V1/DeleteImageImportRequest.php | 155 + .../V1/DeleteMigratingVmRequest.php | 81 + .../VMMigration/V1/DeleteSourceRequest.php | 155 + .../V1/DeleteTargetProjectRequest.php | 155 + .../V1/DeleteUtilizationReportRequest.php | 155 + .../VMMigration/V1/DiskImageTargetDetails.php | 418 + .../Cloud/VMMigration/V1/DiskMigrationJob.php | 348 + .../VMMigration/V1/DiskMigrationJob/State.php | 93 + .../V1/DiskMigrationJobTargetDetails.php | 203 + .../VMMigration/V1/DiskMigrationStep.php | 229 + .../V1/DisksMigrationDisksTargetDefaults.php | 33 + .../V1/DisksMigrationDisksTargetDetails.php | 33 + .../V1/DisksMigrationVmTargetDefaults.php | 619 ++ .../V1/DisksMigrationVmTargetDetails.php | 67 + .../Cloud/VMMigration/V1/Encryption.php | 71 + .../VMMigration/V1/ExtendMigrationRequest.php | 67 + .../V1/ExtendMigrationResponse.php | 33 + .../VMMigration/V1/FetchInventoryRequest.php | 120 + .../VMMigration/V1/FetchInventoryResponse.php | 190 + .../V1/FetchStorageInventoryRequest.php | 241 + .../StorageType.php | 64 + .../V1/FetchStorageInventoryResponse.php | 154 + .../V1/FinalizeMigrationRequest.php | 81 + .../V1/FinalizeMigrationResponse.php | 33 + .../VMMigration/V1/GetCloneJobRequest.php | 81 + .../VMMigration/V1/GetCutoverJobRequest.php | 81 + .../V1/GetDatacenterConnectorRequest.php | 81 + .../V1/GetDiskMigrationJobRequest.php | 81 + .../Cloud/VMMigration/V1/GetGroupRequest.php | 81 + .../V1/GetImageImportJobRequest.php | 81 + .../VMMigration/V1/GetImageImportRequest.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 | 258 + .../V1/Group/MigrationTargetType.php | 64 + .../Cloud/VMMigration/V1/ImageImport.php | 323 + .../Cloud/VMMigration/V1/ImageImportJob.php | 457 ++ .../VMMigration/V1/ImageImportJob/State.php | 92 + .../V1/ImageImportOsAdaptationParameters.php | 163 + .../Cloud/VMMigration/V1/ImageImportStep.php | 262 + .../V1/InitializingImageImportStep.php | 33 + .../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 + .../V1/ListDiskMigrationJobsRequest.php | 245 + .../V1/ListDiskMigrationJobsResponse.php | 143 + .../VMMigration/V1/ListGroupsRequest.php | 241 + .../VMMigration/V1/ListGroupsResponse.php | 139 + .../V1/ListImageImportJobsRequest.php | 253 + .../V1/ListImageImportJobsResponse.php | 139 + .../V1/ListImageImportsRequest.php | 253 + .../V1/ListImageImportsResponse.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 + .../V1/LoadingImageSourceFilesStep.php | 33 + .../V1/MachineImageParametersOverrides.php | 84 + .../V1/MachineImageTargetDetails.php | 612 ++ .../Cloud/VMMigration/V1/MigratingVm.php | 1039 +++ .../VMMigration/V1/MigratingVm/Expiration.php | 148 + .../VMMigration/V1/MigratingVm/State.php | 150 + .../Cloud/VMMigration/V1/MigratingVmView.php | 63 + .../Cloud/VMMigration/V1/MigrationError.php | 239 + .../V1/MigrationError/ErrorCode.php | 134 + .../Cloud/VMMigration/V1/MigrationWarning.php | 239 + .../V1/MigrationWarning/WarningCode.php | 57 + .../Cloud/VMMigration/V1/NetworkInterface.php | 219 + .../VMMigration/V1/OperationMetadata.php | 307 + .../Cloud/VMMigration/V1/OsCapability.php | 69 + .../VMMigration/V1/PauseMigrationRequest.php | 67 + .../VMMigration/V1/PauseMigrationResponse.php | 33 + .../Cloud/VMMigration/V1/PersistentDisk.php | 101 + .../VMMigration/V1/PersistentDiskDefaults.php | 261 + .../VMMigration/V1/PostProcessingStep.php | 33 + .../VMMigration/V1/PreparingVMDisksStep.php | 33 + .../V1/ProvisioningTargetDiskStep.php | 33 + .../V1/RemoveGroupMigrationRequest.php | 115 + .../V1/RemoveGroupMigrationResponse.php | 33 + .../Cloud/VMMigration/V1/ReplicatingStep.php | 177 + .../Cloud/VMMigration/V1/ReplicationCycle.php | 433 ++ .../VMMigration/V1/ReplicationCycle/State.php | 79 + .../Cloud/VMMigration/V1/ReplicationSync.php | 81 + .../VMMigration/V1/ResumeMigrationRequest.php | 67 + .../V1/ResumeMigrationResponse.php | 33 + .../V1/RunDiskMigrationJobRequest.php | 81 + .../V1/RunDiskMigrationJobResponse.php | 33 + .../Cloud/VMMigration/V1/SchedulePolicy.php | 119 + .../VMMigration/V1/SchedulingNodeAffinity.php | 141 + .../V1/SchedulingNodeAffinity/Operator.php | 65 + .../Cloud/VMMigration/V1/ServiceAccount.php | 101 + .../VMMigration/V1/ShieldedInstanceConfig.php | 155 + .../V1/ShieldedInstanceConfig/SecureBoot.php | 66 + .../V1/ShuttingDownSourceVMStep.php | 33 + .../Cloud/VMMigration/V1/SkipOsAdaptation.php | 33 + .../Google/Cloud/VMMigration/V1/Source.php | 380 + .../VMMigration/V1/SourceStorageResource.php | 75 + .../VMMigration/V1/StartMigrationRequest.php | 81 + .../VMMigration/V1/StartMigrationResponse.php | 33 + .../Cloud/VMMigration/V1/TargetProject.php | 228 + .../V1/UpdateDiskMigrationJobRequest.php | 235 + .../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 | 227 + .../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 + .../Cloud/VMMigration/V1/VmArchitecture.php | 61 + .../VMMigration/V1/VmAttachmentDetails.php | 87 + .../Cloud/VMMigration/V1/VmCapabilities.php | 116 + .../VMMigration/V1/VmUtilizationInfo.php | 153 + .../VMMigration/V1/VmUtilizationMetrics.php | 313 + .../VMMigration/V1/VmwareSourceDetails.php | 208 + .../VMMigration/V1/VmwareSourceVmDetails.php | 217 + .../V1/VmwareSourceVmDetails/Firmware.php | 64 + .../VmwareDiskDetails.php | 138 + .../Cloud/VMMigration/V1/VmwareVmDetails.php | 487 ++ .../V1/VmwareVmDetails/BootOption.php | 64 + .../V1/VmwareVmDetails/PowerState.php | 71 + .../V1/VmwareVmDetails/VmArchitecture.php | 64 + .../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 + .../cancel_disk_migration_job.php | 88 + .../cancel_image_import_job.php | 88 + .../V1/VmMigrationClient/create_clone_job.php | 93 + .../VmMigrationClient/create_cutover_job.php | 95 + .../create_datacenter_connector.php | 93 + .../create_disk_migration_job.php | 130 + .../V1/VmMigrationClient/create_group.php | 88 + .../VmMigrationClient/create_image_import.php | 91 + .../VmMigrationClient/create_migrating_vm.php | 88 + .../V1/VmMigrationClient/create_source.php | 88 + .../create_target_project.php | 97 + .../create_utilization_report.php | 95 + .../delete_datacenter_connector.php | 85 + .../delete_disk_migration_job.php | 85 + .../V1/VmMigrationClient/delete_group.php | 80 + .../VmMigrationClient/delete_image_import.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/extend_migration.php | 88 + .../V1/VmMigrationClient/fetch_inventory.php | 75 + .../fetch_storage_inventory.php | 85 + .../VmMigrationClient/finalize_migration.php | 89 + .../V1/VmMigrationClient/get_clone_job.php | 77 + .../V1/VmMigrationClient/get_cutover_job.php | 77 + .../get_datacenter_connector.php | 76 + .../get_disk_migration_job.php | 76 + .../V1/VmMigrationClient/get_group.php | 71 + .../V1/VmMigrationClient/get_image_import.php | 71 + .../get_image_import_job.php | 76 + .../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 | 88 + .../VmMigrationClient/list_cutover_jobs.php | 88 + .../list_datacenter_connectors.php | 82 + .../list_disk_migration_jobs.php | 76 + .../V1/VmMigrationClient/list_groups.php | 82 + .../list_image_import_jobs.php | 76 + .../VmMigrationClient/list_image_imports.php | 76 + .../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 + .../run_disk_migration_job.php | 88 + .../V1/VmMigrationClient/start_migration.php | 89 + .../update_disk_migration_job.php | 116 + .../V1/VmMigrationClient/update_group.php | 71 + .../VmMigrationClient/update_migrating_vm.php | 71 + .../V1/VmMigrationClient/update_source.php | 71 + .../update_target_project.php | 87 + .../VmMigrationClient/upgrade_appliance.php | 89 + .../v1/src/V1/Client/VmMigrationClient.php | 2437 ++++++ .../VmMigration/v1/src/V1/gapic_metadata.json | 338 + .../resources/vm_migration_client_config.json | 372 + .../vm_migration_descriptor_config.php | 1185 +++ .../vm_migration_rest_client_config.php | 872 +++ .../Unit/V1/Client/VmMigrationClientTest.php | 6847 +++++++++++++++++ 299 files changed, 54314 insertions(+) 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/AwsSourceDiskDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDiskDetails/Type.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/AwsDiskDetails.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/AzureSourceDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceDetails/ClientSecretCredentials.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceDetails/State.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceVmDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceVmDetails/AzureDiskDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceVmDetails/Firmware.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/BootOption.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/Disk.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/OSDescription.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/OSDisk.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/PowerState.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/VmArchitecture.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmsDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/BootConversion.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/BootDiskDefaults.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/BootDiskDefaults/DiskImageDefaults.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/CancelDiskMigrationJobRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelDiskMigrationJobResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelImageImportJobRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelImageImportJobResponse.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/ComputeEngineDisk.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/ComputeEngineDisksTargetDefaults.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDisksTargetDetails.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/ComputeEngineNetworkTier.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/CopyingSourceDiskSnapshotStep.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/CreateDiskMigrationJobRequest.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/CreateImageImportRequest.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/CreatingImageStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreatingSourceDiskSnapshotStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverForecast.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/DataDiskImageImport.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/DeleteDiskMigrationJobRequest.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/DeleteImageImportRequest.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/DiskImageTargetDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationJob.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationJob/State.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationJobTargetDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationDisksTargetDefaults.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationDisksTargetDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationVmTargetDefaults.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationVmTargetDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Encryption.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ExtendMigrationRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ExtendMigrationResponse.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/FetchStorageInventoryRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchStorageInventoryRequest/StorageType.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchStorageInventoryResponse.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/GetDiskMigrationJobRequest.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/GetImageImportJobRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetImageImportRequest.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/Group/MigrationTargetType.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImport.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportJob.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportJob/State.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportOsAdaptationParameters.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingImageImportStep.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/ListDiskMigrationJobsRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDiskMigrationJobsResponse.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/ListImageImportJobsRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListImageImportJobsResponse.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListImageImportsRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListImageImportsResponse.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/LoadingImageSourceFilesStep.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MachineImageParametersOverrides.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MachineImageTargetDetails.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/Expiration.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/MigrationWarning.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationWarning/WarningCode.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/OsCapability.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/PersistentDisk.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PersistentDiskDefaults.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/ProvisioningTargetDiskStep.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/RunDiskMigrationJobRequest.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RunDiskMigrationJobResponse.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/ServiceAccount.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShieldedInstanceConfig.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShieldedInstanceConfig/SecureBoot.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/SkipOsAdaptation.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/SourceStorageResource.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/UpdateDiskMigrationJobRequest.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/VmArchitecture.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmAttachmentDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmCapabilities.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/VmwareSourceVmDetails.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceVmDetails/Firmware.php create mode 100644 owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceVmDetails/VmwareDiskDetails.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/VmwareVmDetails/VmArchitecture.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/cancel_disk_migration_job.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_image_import_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_disk_migration_job.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_image_import.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_disk_migration_job.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_image_import.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/extend_migration.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/fetch_storage_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_disk_migration_job.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_image_import.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_image_import_job.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_disk_migration_jobs.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_image_import_jobs.php create mode 100644 owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_image_imports.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/run_disk_migration_job.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_disk_migration_job.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 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..661d359c144b21ee7f505b79d59513ff6deda99e GIT binary patch literal 62065 zcmdsgdvIh|de^pIBOT3XG-p`8t%HgB z{rp6wTCSIK<-Lim#?DT@I*}_ED}}v$b#h{2eq~~LWn&^WpWb*9U2Ek=HJ6{6*e#cL z_wrM@y>erFYQI=4>|($|xiqzZ&HU%299f7`wwSL~vbp@kjn&zud_B9Jt!MAukb~Tt zqe1R%`h(oty!N^fxxH+yHeviMzFAD*f0f48ULiM8t7F34#M6aZrcf%>3)#KG7XZ;4 z6Fb?xS|0tI+wL?oMeojqG!xeTWF7p~^W||iH#zei^$eXiIOjPsrMz!?1 zTsIBy(EICN#HJ-Hg?q_TsZ6_2F4bmce3<+pT6LV;E96V{&iX7A@_XB}`TN=ZLb=*S z*K}#8+*!A^yu!A&VOuPhcB_q2sZiRzw^AV-?`&_pBcE?@-}V>mb;Vhwik1377hUBR zFJ)^Fy6C%60EN}F#Y+2q*DAStscN-cod-b{_By~J>bVZgYqaPiN$G`86cphkx3@hy zSpZ+T>|r+H`Lp8p-tQGJbi`4di`;xtGN4I=0Zr~-8$Ykc%2o>CP=xBthsK{UKI{-a zXSNhVs|IS=DeB1$3P4-+@q*F2s&G?%dP;rT^AT{W>>;3P^tfsyc_J9g)V9L1(B$6t zJmHc0s5!3pk(XBlwx|{wIIl%rqeN)_Y9%+7r*qG2^TDg{dfVtbajr&PS8;~IX`e?FYz>i|FT9}lOL*iqWuEaF%1Uzz>l!>MWrVbQ?& zDI>AbZCz4LhV7VX(m_B^oAA10yE9iFiq2aT8!-%!MgGpCSg#j zzJ$gelT%Dvr`VL8*QFA&SyXb1>=lMF;FSvsy-MSl&gE*y1Mn;{rq-gFTX0gfGUP_)jX~u#@Qh`f{n)Ib%b7x3N$*^ zi|&5wJ+CjZA&*4lr8zv^CNE?f<59e8_dI4DnVz&lYfu;8xID&7QcTgyKiA&!m&B=D zqgsXRkdZ`Af}#|LhNtb9vB&GmC3*Ak8rH-)xf`0p;XwJ08k>;o>1NDVMgMNK+^CG5 z#1KQXmmxZQm~@>9%jJB7+C#n=*voF^_iAIKQo4A#?Ok1z-BP7`^}tDqQ`I~PR~ZN; z;9j3AZ`H<5$pN3S4md~6KULo1o$-XC({dwP3PovgT2I%gm%;sc!ZUKhd(YZu#H{7ZbMpTC}`_2TPxc55#$xym3<{el=a&v#h# zKFA-)%XtWLVE=x0uaRelHPiE2!u|J&cmZ=YwLH%P=8))LOC{&;LcSakVj;b@zL8nK zyF3RO6Y^$qZX>;!8trpN#qqh@8yo18S=mgjjUFR06~D-T406}yq%D+OCis#-HCqu~TEQrTpGAIx4m$w#Szu7-Uj2NHXJ%#0cR2VYFtEvDQb)zMM-D zmP9g$DoM)YpsYx>t62yFN@7%imvRPp}nn!B>(eA#}NF`gZQzbeCCPtdR@ z?R-8@?F;eLenUiy;ICf>fBlh!c*e$GeF7;x8V>7CKs=WJVd1hr(kF%$p3r7G>tY-{ z60WaC%`^%s6^%`UovCOLV%`?#Yxf&<$s)JQ@0EPhh2p*+vmW-k>N}6F%D|vmGDg{AXQj=X1$9tlwI=^j`^V7>$JEIZRBt%6uy$UfwEyvCGX^tT3D}jpuN3oMr60JU z)Ejwk3-t~j;=I1QUkoryfrL50CR=$a4Nt#lT2R+(qP=&p-iSZ0-1%g%>9JFMUP zP0=q6u*$j?W5@N)t^NpFVqn_SHcQjeN!#3p%`#-^WWFD(NPW^Xr}ascutUK6K51H7 zLWW*q!9(ySiF_$nJ%I2J<1b5%F=nom*M4>Y2>#V%|9EFMote*mkbGA>X}QQ1*1Xp3 zB|ZzeyC&`X+A-kXgvHBSxHBV;Jt)>Pp5JBk8r%4$5Y%%x&e0x~Z{-i% z??{N#5f}=i(jYv@i1ATg>LDWi3c`=x1O2l_i%77K_~kxXG{F-J6=iV8Z}t1|dRL%7 z)tP-jE<8&S0(<+U^QaE@;elf|;{L*b7!4!3^BFOk&5=uwV9NkGw`6YT| zl5h&8eXOipJ%FcaH?xNe0PKa>rCqRSntda?3$OX({%~;eHL3-8^rYomdP{1E2mq^e z>f#bBqGa{d0UWgqojk3g28Ri)V5zg+W^E5cuBnia+HDMob=6YR3Qkv%j94R#Aw7WQ z`tgD|6LnC)yb}f*;8vDQ%Xu6|y*!Yjp7Fn$m`N%Gxq|^(=yK~De_r&`K8+goS~@Vg z{!OE;{B1lbo`?e}&hR_eiQU%^CXhBAW$5jlbzp+`@i$XHsN~&W>KBgTPg4xu*%7BX z%!gdOv_;gB;x`BjZ`hBs>AINY;J9@;(wx5nP!O)?T4Rf20BNK3;n2qQI~TOEn;&_#1Fb@*}EMpdwJACVOf?t=>;*7 ztsumWG#>;M?^NOPt2S~7$<1dpoHEpnuey8BigCYvt-Mp0Q4P8!Nn?!e&a!Z_`v|Wj znO%=mlOEYPM{!bjyDgpTD)#G!7->`xZM_ZcMh5A@M@x`hv2N{c?n0Nf3LSBCrc42J;>3xmk#qMq)Ibz*vl?e*7LQ1}#~0(1OizU=~cK$S2SGq)|*#p}P=& zh=CZs7Un(orxTD!L-^*bh_O=sJ;>pez4C#?Uk~M_R1%B8nxHnBQNZJPvQWw(j0H5t z5hIeNcRG&yE*2Xe+u%ohnvhZ;3935-5wf2!|AW)@3}4#K#d?W7=?(;^DNR4n0zP#CJif2`pDxBR(#Uu_mQW5l>lJ1VhX0 zty@C`;wE5-;E}W$;?;oJ$kWzhbx8Mb11<<)u!{!=Jlr|(me4IHr3oqYIUNLAuODEc5vZSUYrz#Z7ULLrh6|9z*rVv@7*p--uCV;#1CM6cssj2A5tg{ zZ|Ut$UtflB5}Yss`(v=m-prA4Z8oaUz}u( z-U|nmp(sUPf<#Z_M$qRDh3cH~b8{RW;@cYyw3aM^;@jaC^#kx&23i!umGXN~AL%B} zOF3v{+U~gvEp~F1`qQHB;a%kz%2T& z$nMNKHpTI5HFv*Ihj0twNgAd`reC+Rp75q@7L&#ha$Gkpgt1o_#rf5hJE^ryRN(r6 z=vi4t%=$6W3!w!9iwsgnX!|k+srS0qh45Dmz3u$$%F0G&1rY%&%b^%}43Sz$W2`~Z zH=ABrAMJ7X#7J;`&J*I|=29lPHg_|UYM4qkb~cfU$cyh{uH7Bh&VvKXXk6 z5;G2v(&k|@X$K)pX5>9hCDKD_t}L; zH3^%|sUD(Gd}lw5RYN{(ah9gdBV!5_^QVIm`wqz=-WF#fx9_9E1(|QA*EVib)L~Nc zn~l4xVRiwgb8~YEd;yV4tI4&b>H%)B)j970<4V8u+AA0hsv2<}Vk;Ev$Q-7ZT>1QS zW+^#0+UH(n+jIa;h3En5vs|qcza*z||HTmEWXOotl0)4JG8gI=X9x%mXs{QlvlZE` z$80UYYKWVKSPk*A@TJKdsnw-P%&8aNm1D$eaMP+d`e{4u1h!yuWqlq!9VnDEf=(r~ zyUs#D%K_esWO&2VAMbE6{>AU$ILs@bd8OSh6Iz+UE$0;bIxg8)8&*vZOD26H2g_Bl zoK?3U?Vm4$`8JV8x1oGfLJ^nEkkC6$5x@oCW~4?`n9 zcQTq0O80|-^zJp-vC==jBu-!|W7~r>0&AsHpmrY~XTGu#KwYNfd$wj$dL^XI5{sXm zF-7>N+ZL6Mi$O?GYZMC!4gnshtpz<;0Y0s)uF|Jo`Xv7a0ZIm8&!>`$iz{>BVffrn zoXYzJO$Mm_?d4m`D|ePhj~$Yoer*M=x5TIxM{C-_@P;_H&8f2Bf#f5yX94K`s=Iqj zoRGJmHy(VL!SSB6W3?gw!PkFM(W5uq_3&^p0iXe1<^DvEI2Tselm!7U=6z1r+Anez zUYw~$gRa*GuL(9U3%?_cz-BSKr82Nn=$;fqSz53hfVg?w?uT{-pB+YKt4cJh zxxd;Y9+R82&f3*csW~A zsZTgWM(Vlp1F{^4jR~N0j)5VpC2yoM5h4uai~02Wt#vRJQofdxtLrycHb{N?y9sfr z1r!SFQesFukhJB>e);k-sl{nGYWJ_?~1Ig*O*KrHVzSFKl z8$A`jxcQOUQ{rR@9QV%-h*P)g1ufPii>zF&L($_be72|H0DGHE6@0zi)Q%W}CQi9) zny0lJhA^j%z!}dC!xY@oG9JpZAW5x_(UDj8_h1+}O!?5?CIJAXN*w8r?FUOzi$>4{46Z_Ni9ng(ZVZ zG5dM1U%fot zL`18=aOB_Yb-%kuTp}-ru{(@ho__{es{#Ma%Q7%*(&-FUQ=)Ibkbh5}=*YDF;%QpT zCVKKU8n|8wWn@Y~_2=@=MGmMIssTM*UPfg}@8iDb& zI3KmcAt&j&I1|-MX?0y4Lo`x;QA{vWT0lRNT_yu`*oEo-@q{?9f;+q*1AVp|Ew+Hg z?=H_eaurB3XHGX6d0U2ZKiDgJOs zT%3!__2x`=W$iV>vQuJ2WyC6hl8tAxFMOE1A}(7*(hXVoW|a#~k#SABOjwkI3{^x@ zg)FcG)fqvg)dGqR$>ozaWq#zCPWsi8S}1aO09K(PNSluSRhGWnL7WQ*AIF(ZmRV3r zQ)D^ylA)%dusc#hWK3BCl{JQ>^d)VWBnZX{DuGR&hpH*vIU8PH0_!I8R?|aZ4Bk&& zNGOo3a7!FV`56?KP!2Sj6n0W>590cC92{jZ z$CX5&T|vC9>cR}{3E@Z@f&z)fXEVeQYGY$W$g)9)nK9#2;zV$R;(V7sJ0!*fXQydO z=J_}CJ~$i#Oz#_ji$w$vOD=X)3~W8bz~(x~ZMoTxj(^P`1^+@6^)~?P3I$;tf^|7} znz)wTD&CrmCWAEDA=7#@kYd*<(~{=&|DQP4uOdjeNm4l@jwzvs;{%wxLOevOjQ$`^ z(EI_Hq?C>5($Fb%-WMu6MU}Sciy=M26Rbu;Svq(~$v_g9LlZy=wdf6WmUFp(K7pu( zfQ*3LUEd`f7yBLTIw>U;s1gVm&_arY*qsr5^4l3P8sQ^>O?7z%0rfJtY&CiJ2HRO@ z@2)H&NbT<@#5rH$ST1kplRL=iM`{~+n!WT##N-TerQtGrl1HZP)jXodoaA!Z$VQ<^ zCo1Gc-a6cc?rUPu`!*)dtgNQilJNV4jK&DLOH;@lVoXpjK7+q|+~4dKr_?d{lREE; z(@32n=>WDsLIvdeOp#kgXR8faSN zBy0~fggm@Oak7Nn&t!S~Nj0FI8ICFO>#s6!b_jMrg;Io^V?Kkbmp`xF_C)TwjMZk`pVZ(BB ziBa|p*+bOi1YQDK#B?YFdRI6w)Z_Se%~GlCNwSBb21nm4YJrTkQ4HOzezM}o+0@VJc!+2>lNps`yfu$3jxJYx>PrTAdS;K z`)sWNbdN#29BmGGnCnM7TArGJ>o^1(}+v8sJdLtfgj zIATMybz~RaFJk9C*AZip-PDDkBd??K=*mlH{8e!_dc^^L9#Kefin7+51|@xS8zpHF zsOnot_*hhwV9 zHeDAy9gf4a36P?rl=_fifc#nQ83rh7SGD}CAriB-#!fQ!lMRZ+ynY<3Nu6wjp%Mh% z0l~lRY4u);Xu`oQqszsfkcVYYxsF+xLCU-?poP@=w}~@(rLVc(g&i$O?Wfs1rYVU# z$R9{e8J_NpKXk0?cW6s+|ENcdh8GXXrXRIBQ5=k@X?XgRR*o6&JxTkJrtW$(a1{sG zy%#}}fVydz7m2L9V)q_Zm`uu$>VxOd4WAxg5vQ8qLV*xnL7TUW0ef2dVICKccs1uYZD(;EavJIPP-i0@S7^p97$ls;RIXrDImQL&TIj{Ve=Ff5v9M2sJ zUI>rPH;`SP4UX+|bv-Z&cFJ|DU`D$sHF)<1WsOgWk>F=D%LD)hL<}+t(zG(sQeGCW z3rA1PKDaN7OTjiFc*t>%ZKCW=4~2W(&xjEvfa}ucFCwvH8!6b{Ga=M^c)E3QTM5g9 zLIrg-GqT2}Os9|zhe7vWCd3%K=hW><75lZ9=o2Bg+@!?4%TBw+f^l&b`Na+{$O$*D zce(Z;GX1#uRj~tmT|i@zM3&KRw?Ba6i`+^^V=uPiupm83Hxk0^Ib?%qVw)-8+r^x~0%=n+gD9$roS8F3EQghugE&3r+eZyH}s z{aG=#Km{$4nDL0f25>1^_5Kl!58#@{SHN8q7b1XDAAcToD_Ann-s{Mi-=J@ZnS7{h zoFs^FwHXq~+K8|Xh0wFK)||Rd5vH)56}h_i%>D<-S_f|V8_K_h5Kr}2i-({!M$tp&Ct!S#&_Be zO?Z?SrTgOvF&?#eMm6WAI2qhYeb?DDHUe8gnAiPnhbJS(S*!{Sst@n*+l%54E(amnmk+T4W3!*=B?oQ9l zyB{Rq5%KQ@z0xk@mPHxCu;u?hB!W0a{7CMB$3#(#B@oArcZ*Ofxt({59x3xg@laV6 zNH10~%~!<$L#4E7*J_uMoe#$&;ZerrCI`}d@s+@(ruHlT+}xiBNX%{n!*zcEun@}4 z2yxX{^g~okdu?t}G!w-`9S$?mz?wT|p5B_6i*&gr=9PKjFs}?OsmoJo%^RT$j=_T< zC-Inq#sTlKFIG3&Mgk;Q2JH#7A1F}%Ve)dj%A^YcHey{$fc-JV|F5Bl&3^vtZ{e^9 zMlVgR{hz@k!UW)jKL3#dC4|ISsr@Cg z_#X^zW)Wl)@NjW=?>z(!&+7puqM>Q?)dm;w%FP3-UHn@JWgs^1FVN%lhuy?S%JILX z3}S(GE4Dw2n*9C&X+gQ86Y5?}MkGG20DoCWbA*4a2SErG^=i6~n+ofTY&DIQp3HZz z+7#1Z$7Ru5V!QMS_ELT;qBghuXrNxIvkMgyWh}kdQlu2dm+DjET$Rl*h#1aEOy6U> zEy-fimqriC4#V!Ri*d?)QJ&8Iy*@GGaaQ>@I+UWm9D+5ZaXBvNDA;vU4lsw#ytdcG z34V54zw*Kx^OzPG=#}TiGAb0p$g#b|FTrrnSFqq5McQUiR;#GEK^y&0XYzi2uY#zg zk{4}o)|~DpzD_RUE6;-ptGq(Wrd4i?xTALe9v-CfAcfKVoP0$uGq*Ay4pljY3Y=UM zBEv83C8+q;`pWG!M73<9B+fjS#Nm%UGR2%fuBBEN(^PB%(k_1`;u%wdZ}ZnaT%xB} z)-&>*FSDDhR57=Ruq!pr08s3NdOuM8bc}|+y^;1x^kDpzwGH)kkk*`B#dW8#UQYth1MU33r}UgAnGy z8+HrQfwUMi15I~<9D2dd#{!u?Vo%C1E{ zDD13>!JR@?eo}OA4;+ddWpY6c!L)@OE4Us*HTsN4thv?O+BL@^X7-GX=xO;^@|hXY zC%uRhJOejbE?dcNp@;zDC~H*axU8t$?gQK`&Kdo9r3<0*Jgn=+jboPolH-iS%h|MI z8QK!|AM&&aNzv7L2#o!#pXXz~A@u0b!b+ zgGRte7%A)}2AYTH3M1Bn7-5f(id)v}Fp8*9Ix~z8Gx}zg50M0NF!!%bMh(&xLTm;RBIa?Bh^6yV zzJZWpRPLRzU<+E{__v93m_G9(M~Z)t5RZ{Ug8~GUJ4BM1e9GHXYvw|_;Y(6Ce8G9% zlA;(MELfq3m|bKE0cn9CE@+kzkjftY*fRCQ13lNlsgSab|8zm*r+(B*+q0e0Z z${u$WhJ<-^xAg-uVjRj&cucMGpn#^~&r$m-Ch!J5J$mHT z{PhZ+)0X!mhUhb5oXLSgzqD=I3!)=5iHl<=vXgVNW!jJ_`VkSmjYmdQ?yQWqYMO!r zD(xolB_5&mEb*=YHY~<%AOyQH^+r6ewjlSBAByKdQ@a2om&lv%y%isfV!Ysy@Ym{iVypqc zBMdkK`TVCpfP8odI12eVNRCg;Uh%dy?)3uqa^kTTxW_Y4;_-0IlOtBtqe&uA4?e`4 zEK9%bzaj++R$;Qe$P(x$14UjMEk}t>D?wE!b#>H5oKn>eJTjIP;r>#uIB6_WzHEzxDatCtBXNZpt-|)s5H(_=s>ZRq$ zt&?T@V`KhR7hV{zhTkKiL^Ha=ADLlvc0lwIz3@BZ{z-*4o<3W4&&6Z%(vtzWJs{j4 z?ic5xnXI!b#sYz_c$Ac?;~_y)KTBv=MUCaH)Z{5hIeFC^MT)05kURVk1J_P0NI8YC zWmW0Ho^3-VVmt_#VD!MqLFM5L0a41yKmkP>Y6W46$PM#jm$Bu@Dx zgpqjlju@-mFXZ>O;neb8r(i-+Owuk#udB}K5(HCZTcZ{VXpA9^&bs47E<1)tX5AeX z{b!KC5jYn-hSZ-&#`vDRX@~r`g9_QAGQ4@oJfWWOEY@=63Q*0H(i86QQ+|EqzCeHp zWb)C?9`|-e^hlHPv5!0@WASE(G66~LSJW0$B8Zq8w{-EyxIe6Pprz*M$r<^GO;ah? zjkVhp>4j3R3(3WGN(#S@2VM=v8bM8Xk0zME$sr|VPI7-EA)buA+9`x(H(!D)nS7b@ zz!aE}HdToPPS2+ui1Vrj(y$i&;!qyZZ()C_E}*LKBSqLQN&>lO`F&3B%4KoF#Y?nd zX71jWSsBJgXnWN4fIX_6pnqc!dh$%B;26JoHpOmIaEx&}H76#FiloNPfe0_WiH#?( zwhjz&$IGBGCd9&(B@r1k1w*dWMnrpdhcOZzboap$|JF;@GKSR0b=XaXQPTu1V0M-B14q9CN192 zcc3r3zpSFugTs6HpA6a5)eKGt8hMA&LYkjqKt|O4tiu~h=982@p%*6U&hP##9uwj5E)7~#Q7|W=hx(G3&9%tY#8sR zhCUpDCO*O%KS*5Uj;H%=s~0_3U$8sx!b=W_aC9O);W#NacEsA=y2`6TbcnJrl2kqt zQ-~(KcGJe#zUdD&OUMYJ?SA%xiGeA}b|aD2t;Cq^Af%v_{XD&h2MeBliKdsI@6%Q7 z;|z6%P4C#uFT!Z|HxpKOP++ZujXI48MmJ?1Xpx1)_=;xy$HS@Z5MtvK{gf$s$pN1u z8~mxJcGIKbpJpM8M9_o#rCv^lHt8pTjBs5I*H!Hs%&i`;vL9DKz?w%diP3B;Q)3<0 zQ1WR{TcT2_!_)REl(dGH5H{OBf>sOmIK@O_rb@Z$f%j@`l66Pi z$HaJRklg={#Fi$iqR^CW08K)ouTkN-5u-qsuh#17PPMRdOCh4p~wr?uU50!V5nlB-Md3fj}J(?jCyEfFrpIThjijLb={D zi;oa_#6A|NL$!=aWl28rz$fU=e@j_ZxYU%L*rGu2->TC?cJ?6KXRT!b5rKANbsBe` z{Np7Q0mL8am1}r(P5v>B2iNe&`o=Z9vqpc+T^k+X*V&TG^U1Y&Jg|mp@s}i<$kQg6 ztW!&N-9)5>$D&sTwh4g)7g|W?fjz0YjpB25ds28hmaCo!lxS!5XBY?jTi^R@zdqPA zm~eG4PPn_LI2;M+k5qL)H4zz%69Ix!9#+KZ=3Ui_bm!aJi`2i9C6wEQSBK(4$`A4- zPB&vdci4(!XpY$ZY zaNXW}>x6I#1jQc9Do`Y9$<+o5wrRiFhMLsW!r{`9dR&Q@0l7IO|8tDNtT0f#{ zD>83ewnS-7=Ew>7;~s0>Y<(VF-Zs!|a*?tN@L0JsC7y3N&`rD@ye1dwb?Cc-=Rd~+ zKpG}fdT;5e&~QksNG-3cSN!Hv3(4Dy8>1g_o)#0fhO%C5BCeIJW!rP*Pf{A4Styh& z;{0g5b47eKG*9c-*j=1(@RZE9{7^fJrdrzY8}3(rG9iwe!FqV^>H^Y5=8~()S>%0e z+zl03#aRVEFK^=AH2wZz61wR+J$3k;cqZ8F#^y3=sV=8B?yRicLRDN;YF$Vo^}5Fa z!UdbA=T{dZTJ~O96eF}<@YyK)Hl=M#xaU@uH&bit&9Bz`m4)#xD}kKZSjo`#^jv}A zy6LGOD(WLKBO>W#Go88<+6<`av&r@J900~d3%3^+F>XAt3K!e04eh@zC|i|R=`&x?D{h7eAl_eMGuu9JL0oDF<6 zI0n_(Rfr-xuCAq)(zlmJd!~Pb@jY(fl^rIB@)nloh$JU3dZi*ei@QW5B& z`1keqlPW3y+yC`%|LGn?GEePagMlPlMS0XWly#ssb!Ey^I;O5XoT^EUwdQ;|A%Qsb1qHy~e$A zX}8)ak&3KJYC}_VYhOuT6a#AX<{ZoSljnIOuh!&-ssDpuEy4Mi+sS6n4DcWh{2s?y zK57drvuT@PHR8Zh<%X{|DtI`G-Vm%kkPuy;o|fptE1hiboIJq(DF9=EsV%_FrfmYY z`<3Jsadx*{MzqW%kh@;qYV1s=iWL-Jk2*dB^{(()wFi;|P)34pFFW=Z2ZN0@ICk%U zxQ`;~C6F{9fIO2=IML(kbVY}z$sGIs zGv9COr6G&C0)8>^mE=bwUvO?pxqm-7rLKd9e1$%sJ@kpsM7&Dr{0|84 z%tM=CkJ+&nz1rNdFLup@XRq*190pJRE3_!0xQHhRYmWVejaJ<>-1fr2t$Qm%Uk?)c zyffPwq2nsX3v*N|9V$f$_43NqnuD;ObD-M@Xk$29bSDj}U6P8J%>^6tZ&M9hdj}Z> z7?C^*6kJfo(Pq#c`)Rc7ry-0X`+o?szszApp*@cjBwkX4?}OsMcX~DIM@{_ixJQ5m zGm-CmIxsF@U{a1au$cX8*{{w0`t+;M7X)$1^ebT_fj{&t>6uC-8lqs&fkFw0w!)i6QhCz8*5PPL2bt9 zZrbGVdhP8|sd*~I*}oGg$$G0XK@3VZwbu~DaPlv=hmvF78Z-OFCdK#8^bLuJW~27h z-zl#PFp@|#h?M^c4rk`I?e9cW`!;uCziXa+{R(4hcc=YFz|?ib9cWyI3*4?O2OGBu z9kHJ0Th-o<&IML4Vf{oh*ni$?CG3ZSZW#GJ|1T6@> zr94G0U-kadBG$UQAdjD0cFgUjGxdYMxtQ)tv1K-D#ADqa` zUWnQcUqxMWmn7KTTxmYcbfM?u(&^lPEg?>j@TbA3IraePKwAy79aBPGlwf%$C|KTf zj_61og!T_ZZqxw9c&v<;8k%RUDwiJDy=}^tdijSw8t40<1uEL|%BIGM{Nd&rkQgcR zF9H=2Fyfc?jAXt~YI5`|kX|*ak!q5>h|^oEl(&8I{B=lSl79RKF}G2uwT9hpM`-G#h!lPe(-r$E z=g1D(`A1+pM0_4#F^nhBRznpNdF>DGg5CIxRKw97wR$V2vvN>ZUeNZ*g3~p}?sV`Q zY6#-}={&H;LihFHkz94I#M9lwsoiS1QK>mUk`RN~NI9fqFNUI<>4mmYwA}r;xygEE zwoT?`(Kh~baBb#eyg2*57%lbsVwhd&E6H*1wTB2d$XUhao@iUDbayx||8eo>-}{A#rZ$QF_tDTw|tAYwJX9f*vUZ9=ru zwW@#h3Lj8=nD*abzG$i-AEWLxwQm!qZ^M-Wbtj^GOELfbB=5IWb7$Q*{NrjR=lUmw zsvPoc0+KyU>Sv+~&&POHqq?*S^>+g5YxZjQk)nnHcuF}KC2aA4S0ifvlXUwP^^OK- zfgp*3-fXHl_7ZW#q=Owa-1fASsDA1moeMJUmmQ8tvFa}mr(l!W^`D+{ei4!oxN=}= zF_KWYxdxO8b2G@8+}37{2cd2( zvtA+D_G9tZ`-H7PX=59a^=rY{u>8L-Sz&%zTIWCDM8S8$D{$<@9??TXYmea! z&*Q#p@+%FV?a(-I3!+X4xMtXhm;H)z$r(xQ?YQL3<{Gegmt3%yx=g^3O{HwwVUaH8 zGAZ~~{%X$8!PbQxH-?X~_5~Yj0PK!9V|4eE=Aq~n+YZHCE^Rx^0Lmk53>zc0@daYE z*XxeCKE59u6CPosW2CsEJ;HLSsP9K*a<7{I(D%lhZpSAy!^Kn8s1D2k%H?J*%8ozG zBaQZLLciBFhn&8`aCUO8#Q%xc8S5m&Yz()E=%Jyr#|uVwRCLuO;vFqr>zk2uGSC7k*d6TKGQsm*=(1+b)NBFdRWISh0}=XO*2 z?A7L^LNezFreAff=pOhhW9^HnAOg!if)@u#Ve-m7@=C!(t&^3~wwnRE^dHd(Gn z-U&|`!@(kYXz=XvPIw-7*}PgcJT`3i<(=(N0=G11{tOVDwTkcM{Hz_Okr#V2Nxv5oQvF}YJiX&p+9N)Da?pJiDHuvkByS}B9R~Y3Ffg=A4 zC?Ao58-wx@J=z5JyMP=oT9bYw1vLK>xao2(M)xq!Ak&I0O8*z9&9_m9rybp?%?%)n z+DmaM#}RuVjfl6DxBL*m=d{0gd>MA<)@8~6RdVuvybZD>v##LMZER0&E_r6t$<1qD(O>V~lb`S1Grr>=*FNZZoV(A=$Obbr zMg#og+6T$ciznqO9~7GktISbFpz^K!LHm{4ALI|#km`p*PxvcS#h(wSWMLs12EX#( z8GL;BLGrG6GQL*n%N1o1HL6e50)QYv&VM-02W zSKi9*v1ElorKtIEYXB|l<(Hln6Y76gC+gKk{<+tM_X`5k>V@3Q%+m#WLrhg9&u>q> OAzQvK+dUKyh4_E90xCWL 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..d46819537554 --- /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..a256ab46f7f5 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/AccessKeyCredentials.php @@ -0,0 +1,146 @@ +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 = ''; + /** + * Input only. AWS session token. + * Used only when AWS security token service (STS) is responsible for + * creating the temporary credentials. + * + * Generated from protobuf field string session_token = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $session_token = ''; + + /** + * 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. + * @type string $session_token + * Input only. AWS session token. + * Used only when AWS security token service (STS) is responsible for + * creating the temporary credentials. + * } + */ + 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; + } + + /** + * Input only. AWS session token. + * Used only when AWS security token service (STS) is responsible for + * creating the temporary credentials. + * + * Generated from protobuf field string session_token = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getSessionToken() + { + return $this->session_token; + } + + /** + * Input only. AWS session token. + * Used only when AWS security token service (STS) is responsible for + * creating the temporary credentials. + * + * Generated from protobuf field string session_token = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSessionToken($var) + { + GPBUtil::checkString($var, True); + $this->session_token = $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..5b4461d9a74e --- /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 +{ + /** + * Required. Key of tag. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $key = ''; + /** + * Required. Value of tag. + * + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * Required. Key of tag. + * @type string $value + * Required. Value of tag. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. Key of tag. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Required. Key of tag. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * Required. Value of tag. + * + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * Required. Value of tag. + * + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; + * @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/AwsSourceDiskDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDiskDetails.php new file mode 100644 index 000000000000..5788e1a55a8f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDiskDetails.php @@ -0,0 +1,169 @@ +google.cloud.vmmigration.v1.AwsSourceDiskDetails + */ +class AwsSourceDiskDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Required. AWS volume ID. + * + * Generated from protobuf field string volume_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $volume_id = ''; + /** + * Output only. Size in GiB. + * + * Generated from protobuf field int64 size_gib = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $size_gib = 0; + /** + * Optional. Output only. Disk type. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDiskDetails.Type disk_type = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $disk_type = 0; + /** + * Optional. Output only. A map of AWS volume tags. + * + * Generated from protobuf field map tags = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $tags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $volume_id + * Required. AWS volume ID. + * @type int|string $size_gib + * Output only. Size in GiB. + * @type int $disk_type + * Optional. Output only. Disk type. + * @type array|\Google\Protobuf\Internal\MapField $tags + * Optional. Output only. A map of AWS volume tags. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. AWS volume ID. + * + * Generated from protobuf field string volume_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVolumeId() + { + return $this->volume_id; + } + + /** + * Required. AWS volume ID. + * + * Generated from protobuf field string volume_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVolumeId($var) + { + GPBUtil::checkString($var, True); + $this->volume_id = $var; + + return $this; + } + + /** + * Output only. Size in GiB. + * + * Generated from protobuf field int64 size_gib = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getSizeGib() + { + return $this->size_gib; + } + + /** + * Output only. Size in GiB. + * + * Generated from protobuf field int64 size_gib = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setSizeGib($var) + { + GPBUtil::checkInt64($var); + $this->size_gib = $var; + + return $this; + } + + /** + * Optional. Output only. Disk type. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDiskDetails.Type disk_type = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getDiskType() + { + return $this->disk_type; + } + + /** + * Optional. Output only. Disk type. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDiskDetails.Type disk_type = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDiskType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsSourceDiskDetails\Type::class); + $this->disk_type = $var; + + return $this; + } + + /** + * Optional. Output only. A map of AWS volume tags. + * + * Generated from protobuf field map tags = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. Output only. A map of AWS volume tags. + * + * Generated from protobuf field map tags = 4 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDiskDetails/Type.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDiskDetails/Type.php new file mode 100644 index 000000000000..45ee4d6215e3 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDiskDetails/Type.php @@ -0,0 +1,99 @@ +google.cloud.vmmigration.v1.AwsSourceDiskDetails.Type + */ +class Type +{ + /** + * Unspecified AWS disk type. Should not be used. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * GP2 disk type. + * + * Generated from protobuf enum GP2 = 1; + */ + const GP2 = 1; + /** + * GP3 disk type. + * + * Generated from protobuf enum GP3 = 2; + */ + const GP3 = 2; + /** + * IO1 disk type. + * + * Generated from protobuf enum IO1 = 3; + */ + const IO1 = 3; + /** + * IO2 disk type. + * + * Generated from protobuf enum IO2 = 4; + */ + const IO2 = 4; + /** + * ST1 disk type. + * + * Generated from protobuf enum ST1 = 5; + */ + const ST1 = 5; + /** + * SC1 disk type. + * + * Generated from protobuf enum SC1 = 6; + */ + const SC1 = 6; + /** + * Standard disk type. + * + * Generated from protobuf enum STANDARD = 7; + */ + const STANDARD = 7; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::GP2 => 'GP2', + self::GP3 => 'GP3', + self::IO1 => 'IO1', + self::IO2 => 'IO2', + self::ST1 => 'ST1', + self::SC1 => 'SC1', + 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\VMMigration\V1\AwsSourceDiskDetails_Type::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..eaf005a088c3 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails.php @@ -0,0 +1,217 @@ +google.cloud.vmmigration.v1.AwsSourceVmDetails + */ +class AwsSourceVmDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The firmware type of the source VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $firmware = 0; + /** + * Output only. The total size of the disks being migrated in bytes. + * + * Generated from protobuf field int64 committed_storage_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $committed_storage_bytes = 0; + /** + * Output only. The disks attached to the source VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceVmDetails.AwsDiskDetails disks = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $disks; + /** + * Output only. Information about VM capabilities needed for some Compute + * Engine features. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmCapabilities vm_capabilities_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $vm_capabilities_info = null; + /** + * Output only. The VM architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmArchitecture architecture = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $architecture = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $firmware + * Output only. The firmware type of the source VM. + * @type int|string $committed_storage_bytes + * Output only. The total size of the disks being migrated in bytes. + * @type array<\Google\Cloud\VMMigration\V1\AwsSourceVmDetails\AwsDiskDetails>|\Google\Protobuf\Internal\RepeatedField $disks + * Output only. The disks attached to the source VM. + * @type \Google\Cloud\VMMigration\V1\VmCapabilities $vm_capabilities_info + * Output only. Information about VM capabilities needed for some Compute + * Engine features. + * @type int $architecture + * Output only. The VM architecture. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The firmware type of the source VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getFirmware() + { + return $this->firmware; + } + + /** + * Output only. The firmware type of the source VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setFirmware($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsSourceVmDetails\Firmware::class); + $this->firmware = $var; + + return $this; + } + + /** + * Output only. The total size of the disks being migrated in bytes. + * + * Generated from protobuf field int64 committed_storage_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getCommittedStorageBytes() + { + return $this->committed_storage_bytes; + } + + /** + * Output only. The total size of the disks being migrated in bytes. + * + * Generated from protobuf field int64 committed_storage_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setCommittedStorageBytes($var) + { + GPBUtil::checkInt64($var); + $this->committed_storage_bytes = $var; + + return $this; + } + + /** + * Output only. The disks attached to the source VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceVmDetails.AwsDiskDetails disks = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDisks() + { + return $this->disks; + } + + /** + * Output only. The disks attached to the source VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceVmDetails.AwsDiskDetails disks = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\AwsSourceVmDetails\AwsDiskDetails>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDisks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\AwsSourceVmDetails\AwsDiskDetails::class); + $this->disks = $arr; + + return $this; + } + + /** + * Output only. Information about VM capabilities needed for some Compute + * Engine features. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmCapabilities vm_capabilities_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\VmCapabilities|null + */ + public function getVmCapabilitiesInfo() + { + return $this->vm_capabilities_info; + } + + public function hasVmCapabilitiesInfo() + { + return isset($this->vm_capabilities_info); + } + + public function clearVmCapabilitiesInfo() + { + unset($this->vm_capabilities_info); + } + + /** + * Output only. Information about VM capabilities needed for some Compute + * Engine features. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmCapabilities vm_capabilities_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\VmCapabilities $var + * @return $this + */ + public function setVmCapabilitiesInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmCapabilities::class); + $this->vm_capabilities_info = $var; + + return $this; + } + + /** + * Output only. The VM architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmArchitecture architecture = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getArchitecture() + { + return $this->architecture; + } + + /** + * Output only. The VM architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmArchitecture architecture = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setArchitecture($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\VmArchitecture::class); + $this->architecture = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/AwsDiskDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/AwsDiskDetails.php new file mode 100644 index 000000000000..5c19c501f63b --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/AwsDiskDetails.php @@ -0,0 +1,138 @@ +google.cloud.vmmigration.v1.AwsSourceVmDetails.AwsDiskDetails + */ +class AwsDiskDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The ordinal number of the disk. + * + * Generated from protobuf field int32 disk_number = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $disk_number = 0; + /** + * Output only. AWS volume ID. + * + * Generated from protobuf field string volume_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $volume_id = ''; + /** + * Output only. Size in GB. + * + * Generated from protobuf field int64 size_gb = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $size_gb = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $disk_number + * Output only. The ordinal number of the disk. + * @type string $volume_id + * Output only. AWS volume ID. + * @type int|string $size_gb + * Output only. Size in GB. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The ordinal number of the disk. + * + * Generated from protobuf field int32 disk_number = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getDiskNumber() + { + return $this->disk_number; + } + + /** + * Output only. The ordinal number of the disk. + * + * Generated from protobuf field int32 disk_number = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDiskNumber($var) + { + GPBUtil::checkInt32($var); + $this->disk_number = $var; + + return $this; + } + + /** + * Output only. AWS volume ID. + * + * Generated from protobuf field string volume_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVolumeId() + { + return $this->volume_id; + } + + /** + * Output only. AWS volume ID. + * + * Generated from protobuf field string volume_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVolumeId($var) + { + GPBUtil::checkString($var, True); + $this->volume_id = $var; + + return $this; + } + + /** + * Output only. Size in GB. + * + * Generated from protobuf field int64 size_gb = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getSizeGb() + { + return $this->size_gb; + } + + /** + * Output only. Size in GB. + * + * Generated from protobuf field int64 size_gb = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setSizeGb($var) + { + GPBUtil::checkInt64($var); + $this->size_gb = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AwsDiskDetails::class, \Google\Cloud\VMMigration\V1\AwsSourceVmDetails_AwsDiskDetails::class); + 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..07d9150484c6 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails.php @@ -0,0 +1,683 @@ +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 CPU cores 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; + /** + * The number of vCPUs the VM has. It is calculated as the + * number of CPU cores * threads per CPU the VM has. + * + * Generated from protobuf field int32 vcpu_count = 19; + */ + protected $vcpu_count = 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 CPU cores 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. + * @type int $vcpu_count + * The number of vCPUs the VM has. It is calculated as the + * number of CPU cores * threads per CPU the VM has. + * } + */ + 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 CPU cores the VM has. + * + * Generated from protobuf field int32 cpu_count = 6; + * @return int + */ + public function getCpuCount() + { + return $this->cpu_count; + } + + /** + * The number of CPU cores 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; + } + + /** + * The number of vCPUs the VM has. It is calculated as the + * number of CPU cores * threads per CPU the VM has. + * + * Generated from protobuf field int32 vcpu_count = 19; + * @return int + */ + public function getVcpuCount() + { + return $this->vcpu_count; + } + + /** + * The number of vCPUs the VM has. It is calculated as the + * number of CPU cores * threads per CPU the VM has. + * + * Generated from protobuf field int32 vcpu_count = 19; + * @param int $var + * @return $this + */ + public function setVcpuCount($var) + { + GPBUtil::checkInt32($var); + $this->vcpu_count = $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/AzureSourceDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceDetails.php new file mode 100644 index 000000000000..6dbd2de3621c --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceDetails.php @@ -0,0 +1,314 @@ +google.cloud.vmmigration.v1.AzureSourceDetails + */ +class AzureSourceDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Azure subscription ID. + * + * Generated from protobuf field string subscription_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $subscription_id = ''; + /** + * Immutable. The Azure location (region) that the source VMs will be migrated + * from. + * + * Generated from protobuf field string azure_location = 5 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $azure_location = ''; + /** + * Output only. State of the source as determined by the health check. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureSourceDetails.State state = 6 [(.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 = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * User specified tags to add to every M2VM generated resource in Azure. + * 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 + * `m4ce` or `m2vm`. + * + * Generated from protobuf field map migration_resources_user_tags = 8; + */ + private $migration_resources_user_tags; + /** + * Output only. The ID of the Azure resource group that contains all resources + * related to the migration process of this source. + * + * Generated from protobuf field string resource_group_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $resource_group_id = ''; + protected $credentials_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\AzureSourceDetails\ClientSecretCredentials $client_secret_creds + * Azure Credentials using tenant ID, client ID and secret. + * @type string $subscription_id + * Immutable. Azure subscription ID. + * @type string $azure_location + * Immutable. The Azure location (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\Protobuf\Internal\MapField $migration_resources_user_tags + * User specified tags to add to every M2VM generated resource in Azure. + * 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 + * `m4ce` or `m2vm`. + * @type string $resource_group_id + * Output only. The ID of the Azure resource group that contains all resources + * related to the migration process of this source. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Azure Credentials using tenant ID, client ID and secret. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureSourceDetails.ClientSecretCredentials client_secret_creds = 9; + * @return \Google\Cloud\VMMigration\V1\AzureSourceDetails\ClientSecretCredentials|null + */ + public function getClientSecretCreds() + { + return $this->readOneof(9); + } + + public function hasClientSecretCreds() + { + return $this->hasOneof(9); + } + + /** + * Azure Credentials using tenant ID, client ID and secret. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureSourceDetails.ClientSecretCredentials client_secret_creds = 9; + * @param \Google\Cloud\VMMigration\V1\AzureSourceDetails\ClientSecretCredentials $var + * @return $this + */ + public function setClientSecretCreds($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AzureSourceDetails\ClientSecretCredentials::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Immutable. Azure subscription ID. + * + * Generated from protobuf field string subscription_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getSubscriptionId() + { + return $this->subscription_id; + } + + /** + * Immutable. Azure subscription ID. + * + * Generated from protobuf field string subscription_id = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setSubscriptionId($var) + { + GPBUtil::checkString($var, True); + $this->subscription_id = $var; + + return $this; + } + + /** + * Immutable. The Azure location (region) that the source VMs will be migrated + * from. + * + * Generated from protobuf field string azure_location = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getAzureLocation() + { + return $this->azure_location; + } + + /** + * Immutable. The Azure location (region) that the source VMs will be migrated + * from. + * + * Generated from protobuf field string azure_location = 5 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setAzureLocation($var) + { + GPBUtil::checkString($var, True); + $this->azure_location = $var; + + return $this; + } + + /** + * Output only. State of the source as determined by the health check. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureSourceDetails.State state = 6 [(.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.AzureSourceDetails.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AzureSourceDetails\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 = 7 [(.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 = 7 [(.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; + } + + /** + * User specified tags to add to every M2VM generated resource in Azure. + * 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 + * `m4ce` or `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 Azure. + * 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 + * `m4ce` or `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 ID of the Azure resource group that contains all resources + * related to the migration process of this source. + * + * Generated from protobuf field string resource_group_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getResourceGroupId() + { + return $this->resource_group_id; + } + + /** + * Output only. The ID of the Azure resource group that contains all resources + * related to the migration process of this source. + * + * Generated from protobuf field string resource_group_id = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setResourceGroupId($var) + { + GPBUtil::checkString($var, True); + $this->resource_group_id = $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/AzureSourceDetails/ClientSecretCredentials.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceDetails/ClientSecretCredentials.php new file mode 100644 index 000000000000..28017bd20113 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceDetails/ClientSecretCredentials.php @@ -0,0 +1,138 @@ +google.cloud.vmmigration.v1.AzureSourceDetails.ClientSecretCredentials + */ +class ClientSecretCredentials extends \Google\Protobuf\Internal\Message +{ + /** + * Azure tenant ID. + * + * Generated from protobuf field string tenant_id = 1; + */ + protected $tenant_id = ''; + /** + * Azure client ID. + * + * Generated from protobuf field string client_id = 2; + */ + protected $client_id = ''; + /** + * Input only. Azure client secret. + * + * Generated from protobuf field string client_secret = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $client_secret = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $tenant_id + * Azure tenant ID. + * @type string $client_id + * Azure client ID. + * @type string $client_secret + * Input only. Azure client secret. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Azure tenant ID. + * + * Generated from protobuf field string tenant_id = 1; + * @return string + */ + public function getTenantId() + { + return $this->tenant_id; + } + + /** + * Azure tenant ID. + * + * Generated from protobuf field string tenant_id = 1; + * @param string $var + * @return $this + */ + public function setTenantId($var) + { + GPBUtil::checkString($var, True); + $this->tenant_id = $var; + + return $this; + } + + /** + * Azure client ID. + * + * Generated from protobuf field string client_id = 2; + * @return string + */ + public function getClientId() + { + return $this->client_id; + } + + /** + * Azure client ID. + * + * Generated from protobuf field string client_id = 2; + * @param string $var + * @return $this + */ + public function setClientId($var) + { + GPBUtil::checkString($var, True); + $this->client_id = $var; + + return $this; + } + + /** + * Input only. Azure client secret. + * + * Generated from protobuf field string client_secret = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getClientSecret() + { + return $this->client_secret; + } + + /** + * Input only. Azure client secret. + * + * Generated from protobuf field string client_secret = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setClientSecret($var) + { + GPBUtil::checkString($var, True); + $this->client_secret = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ClientSecretCredentials::class, \Google\Cloud\VMMigration\V1\AzureSourceDetails_ClientSecretCredentials::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceDetails/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceDetails/State.php new file mode 100644 index 000000000000..5986ac5ed1c4 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceDetails/State.php @@ -0,0 +1,74 @@ +google.cloud.vmmigration.v1.AzureSourceDetails.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\AzureSourceDetails_State::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceVmDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceVmDetails.php new file mode 100644 index 000000000000..3cb39a88c439 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceVmDetails.php @@ -0,0 +1,217 @@ +google.cloud.vmmigration.v1.AzureSourceVmDetails + */ +class AzureSourceVmDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The firmware type of the source VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureSourceVmDetails.Firmware firmware = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $firmware = 0; + /** + * Output only. The total size of the disks being migrated in bytes. + * + * Generated from protobuf field int64 committed_storage_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $committed_storage_bytes = 0; + /** + * Output only. The disks attached to the source VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AzureSourceVmDetails.AzureDiskDetails disks = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $disks; + /** + * Output only. Information about VM capabilities needed for some Compute + * Engine features. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmCapabilities vm_capabilities_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $vm_capabilities_info = null; + /** + * Output only. The VM architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmArchitecture architecture = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $architecture = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $firmware + * Output only. The firmware type of the source VM. + * @type int|string $committed_storage_bytes + * Output only. The total size of the disks being migrated in bytes. + * @type array<\Google\Cloud\VMMigration\V1\AzureSourceVmDetails\AzureDiskDetails>|\Google\Protobuf\Internal\RepeatedField $disks + * Output only. The disks attached to the source VM. + * @type \Google\Cloud\VMMigration\V1\VmCapabilities $vm_capabilities_info + * Output only. Information about VM capabilities needed for some Compute + * Engine features. + * @type int $architecture + * Output only. The VM architecture. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The firmware type of the source VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureSourceVmDetails.Firmware firmware = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getFirmware() + { + return $this->firmware; + } + + /** + * Output only. The firmware type of the source VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureSourceVmDetails.Firmware firmware = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setFirmware($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AzureSourceVmDetails\Firmware::class); + $this->firmware = $var; + + return $this; + } + + /** + * Output only. The total size of the disks being migrated in bytes. + * + * Generated from protobuf field int64 committed_storage_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getCommittedStorageBytes() + { + return $this->committed_storage_bytes; + } + + /** + * Output only. The total size of the disks being migrated in bytes. + * + * Generated from protobuf field int64 committed_storage_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setCommittedStorageBytes($var) + { + GPBUtil::checkInt64($var); + $this->committed_storage_bytes = $var; + + return $this; + } + + /** + * Output only. The disks attached to the source VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AzureSourceVmDetails.AzureDiskDetails disks = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDisks() + { + return $this->disks; + } + + /** + * Output only. The disks attached to the source VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AzureSourceVmDetails.AzureDiskDetails disks = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\AzureSourceVmDetails\AzureDiskDetails>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDisks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\AzureSourceVmDetails\AzureDiskDetails::class); + $this->disks = $arr; + + return $this; + } + + /** + * Output only. Information about VM capabilities needed for some Compute + * Engine features. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmCapabilities vm_capabilities_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\VmCapabilities|null + */ + public function getVmCapabilitiesInfo() + { + return $this->vm_capabilities_info; + } + + public function hasVmCapabilitiesInfo() + { + return isset($this->vm_capabilities_info); + } + + public function clearVmCapabilitiesInfo() + { + unset($this->vm_capabilities_info); + } + + /** + * Output only. Information about VM capabilities needed for some Compute + * Engine features. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmCapabilities vm_capabilities_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\VmCapabilities $var + * @return $this + */ + public function setVmCapabilitiesInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmCapabilities::class); + $this->vm_capabilities_info = $var; + + return $this; + } + + /** + * Output only. The VM architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmArchitecture architecture = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getArchitecture() + { + return $this->architecture; + } + + /** + * Output only. The VM architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmArchitecture architecture = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setArchitecture($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\VmArchitecture::class); + $this->architecture = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceVmDetails/AzureDiskDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceVmDetails/AzureDiskDetails.php new file mode 100644 index 000000000000..30f74eab3b05 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceVmDetails/AzureDiskDetails.php @@ -0,0 +1,138 @@ +google.cloud.vmmigration.v1.AzureSourceVmDetails.AzureDiskDetails + */ +class AzureDiskDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The ordinal number of the disk. + * + * Generated from protobuf field int32 disk_number = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $disk_number = 0; + /** + * Output only. Azure disk ID. + * + * Generated from protobuf field string disk_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $disk_id = ''; + /** + * Output only. Size in GB. + * + * Generated from protobuf field int64 size_gb = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $size_gb = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $disk_number + * Output only. The ordinal number of the disk. + * @type string $disk_id + * Output only. Azure disk ID. + * @type int|string $size_gb + * Output only. Size in GB. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The ordinal number of the disk. + * + * Generated from protobuf field int32 disk_number = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getDiskNumber() + { + return $this->disk_number; + } + + /** + * Output only. The ordinal number of the disk. + * + * Generated from protobuf field int32 disk_number = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDiskNumber($var) + { + GPBUtil::checkInt32($var); + $this->disk_number = $var; + + return $this; + } + + /** + * Output only. Azure disk ID. + * + * Generated from protobuf field string disk_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDiskId() + { + return $this->disk_id; + } + + /** + * Output only. Azure disk ID. + * + * Generated from protobuf field string disk_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDiskId($var) + { + GPBUtil::checkString($var, True); + $this->disk_id = $var; + + return $this; + } + + /** + * Output only. Size in GB. + * + * Generated from protobuf field int64 size_gb = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getSizeGb() + { + return $this->size_gb; + } + + /** + * Output only. Size in GB. + * + * Generated from protobuf field int64 size_gb = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setSizeGb($var) + { + GPBUtil::checkInt64($var); + $this->size_gb = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AzureDiskDetails::class, \Google\Cloud\VMMigration\V1\AzureSourceVmDetails_AzureDiskDetails::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceVmDetails/Firmware.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceVmDetails/Firmware.php new file mode 100644 index 000000000000..b2e24c8837d8 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceVmDetails/Firmware.php @@ -0,0 +1,64 @@ +google.cloud.vmmigration.v1.AzureSourceVmDetails.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\AzureSourceVmDetails_Firmware::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails.php new file mode 100644 index 000000000000..8f1b25e5decd --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails.php @@ -0,0 +1,529 @@ +google.cloud.vmmigration.v1.AzureVmDetails + */ +class AzureVmDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The VM full path in Azure. + * + * Generated from protobuf field string vm_id = 1; + */ + protected $vm_id = ''; + /** + * The power state of the VM at the moment list was taken. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureVmDetails.PowerState power_state = 2; + */ + protected $power_state = 0; + /** + * VM size as configured in Azure. Determines the VM's hardware spec. + * + * Generated from protobuf field string vm_size = 3; + */ + protected $vm_size = ''; + /** + * The number of cpus the VM has. + * + * Generated from protobuf field int32 cpu_count = 4; + */ + protected $cpu_count = 0; + /** + * The memory size of the VM in MB. + * + * Generated from protobuf field int32 memory_mb = 5; + */ + protected $memory_mb = 0; + /** + * The number of disks the VM has, including OS disk. + * + * Generated from protobuf field int32 disk_count = 6; + */ + protected $disk_count = 0; + /** + * The total size of the storage allocated to the VM in MB. + * + * Generated from protobuf field int64 committed_storage_mb = 7; + */ + protected $committed_storage_mb = 0; + /** + * Description of the OS disk. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureVmDetails.OSDisk os_disk = 8; + */ + protected $os_disk = null; + /** + * Description of the data disks. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AzureVmDetails.Disk disks = 9; + */ + private $disks; + /** + * Description of the OS. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureVmDetails.OSDescription os_description = 10; + */ + protected $os_description = null; + /** + * The VM Boot Option. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureVmDetails.BootOption boot_option = 11; + */ + protected $boot_option = 0; + /** + * The tags of the VM. + * + * Generated from protobuf field map tags = 12; + */ + private $tags; + /** + * The VM's ComputerName. + * + * Generated from protobuf field string computer_name = 13; + */ + protected $computer_name = ''; + /** + * The CPU architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureVmDetails.VmArchitecture architecture = 14; + */ + protected $architecture = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $vm_id + * The VM full path in Azure. + * @type int $power_state + * The power state of the VM at the moment list was taken. + * @type string $vm_size + * VM size as configured in Azure. Determines the VM's hardware spec. + * @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, including OS disk. + * @type int|string $committed_storage_mb + * The total size of the storage allocated to the VM in MB. + * @type \Google\Cloud\VMMigration\V1\AzureVmDetails\OSDisk $os_disk + * Description of the OS disk. + * @type array<\Google\Cloud\VMMigration\V1\AzureVmDetails\Disk>|\Google\Protobuf\Internal\RepeatedField $disks + * Description of the data disks. + * @type \Google\Cloud\VMMigration\V1\AzureVmDetails\OSDescription $os_description + * Description of the OS. + * @type int $boot_option + * The VM Boot Option. + * @type array|\Google\Protobuf\Internal\MapField $tags + * The tags of the VM. + * @type string $computer_name + * The VM's ComputerName. + * @type int $architecture + * The CPU architecture. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The VM full path in Azure. + * + * Generated from protobuf field string vm_id = 1; + * @return string + */ + public function getVmId() + { + return $this->vm_id; + } + + /** + * The VM full path in Azure. + * + * 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 power state of the VM at the moment list was taken. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureVmDetails.PowerState power_state = 2; + * @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.AzureVmDetails.PowerState power_state = 2; + * @param int $var + * @return $this + */ + public function setPowerState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AzureVmDetails\PowerState::class); + $this->power_state = $var; + + return $this; + } + + /** + * VM size as configured in Azure. Determines the VM's hardware spec. + * + * Generated from protobuf field string vm_size = 3; + * @return string + */ + public function getVmSize() + { + return $this->vm_size; + } + + /** + * VM size as configured in Azure. Determines the VM's hardware spec. + * + * Generated from protobuf field string vm_size = 3; + * @param string $var + * @return $this + */ + public function setVmSize($var) + { + GPBUtil::checkString($var, True); + $this->vm_size = $var; + + return $this; + } + + /** + * The number of cpus the VM has. + * + * Generated from protobuf field int32 cpu_count = 4; + * @return int + */ + public function getCpuCount() + { + return $this->cpu_count; + } + + /** + * The number of cpus the VM has. + * + * Generated from protobuf field int32 cpu_count = 4; + * @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 = 5; + * @return int + */ + public function getMemoryMb() + { + return $this->memory_mb; + } + + /** + * The memory size of the VM in MB. + * + * Generated from protobuf field int32 memory_mb = 5; + * @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, including OS disk. + * + * Generated from protobuf field int32 disk_count = 6; + * @return int + */ + public function getDiskCount() + { + return $this->disk_count; + } + + /** + * The number of disks the VM has, including OS disk. + * + * Generated from protobuf field int32 disk_count = 6; + * @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 = 7; + * @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 = 7; + * @param int|string $var + * @return $this + */ + public function setCommittedStorageMb($var) + { + GPBUtil::checkInt64($var); + $this->committed_storage_mb = $var; + + return $this; + } + + /** + * Description of the OS disk. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureVmDetails.OSDisk os_disk = 8; + * @return \Google\Cloud\VMMigration\V1\AzureVmDetails\OSDisk|null + */ + public function getOsDisk() + { + return $this->os_disk; + } + + public function hasOsDisk() + { + return isset($this->os_disk); + } + + public function clearOsDisk() + { + unset($this->os_disk); + } + + /** + * Description of the OS disk. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureVmDetails.OSDisk os_disk = 8; + * @param \Google\Cloud\VMMigration\V1\AzureVmDetails\OSDisk $var + * @return $this + */ + public function setOsDisk($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AzureVmDetails\OSDisk::class); + $this->os_disk = $var; + + return $this; + } + + /** + * Description of the data disks. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AzureVmDetails.Disk disks = 9; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDisks() + { + return $this->disks; + } + + /** + * Description of the data disks. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AzureVmDetails.Disk disks = 9; + * @param array<\Google\Cloud\VMMigration\V1\AzureVmDetails\Disk>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDisks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\AzureVmDetails\Disk::class); + $this->disks = $arr; + + return $this; + } + + /** + * Description of the OS. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureVmDetails.OSDescription os_description = 10; + * @return \Google\Cloud\VMMigration\V1\AzureVmDetails\OSDescription|null + */ + public function getOsDescription() + { + return $this->os_description; + } + + public function hasOsDescription() + { + return isset($this->os_description); + } + + public function clearOsDescription() + { + unset($this->os_description); + } + + /** + * Description of the OS. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureVmDetails.OSDescription os_description = 10; + * @param \Google\Cloud\VMMigration\V1\AzureVmDetails\OSDescription $var + * @return $this + */ + public function setOsDescription($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AzureVmDetails\OSDescription::class); + $this->os_description = $var; + + return $this; + } + + /** + * The VM Boot Option. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureVmDetails.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.AzureVmDetails.BootOption boot_option = 11; + * @param int $var + * @return $this + */ + public function setBootOption($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AzureVmDetails\BootOption::class); + $this->boot_option = $var; + + return $this; + } + + /** + * The tags of the VM. + * + * Generated from protobuf field map tags = 12; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTags() + { + return $this->tags; + } + + /** + * The tags of the VM. + * + * Generated from protobuf field map tags = 12; + * @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 VM's ComputerName. + * + * Generated from protobuf field string computer_name = 13; + * @return string + */ + public function getComputerName() + { + return $this->computer_name; + } + + /** + * The VM's ComputerName. + * + * Generated from protobuf field string computer_name = 13; + * @param string $var + * @return $this + */ + public function setComputerName($var) + { + GPBUtil::checkString($var, True); + $this->computer_name = $var; + + return $this; + } + + /** + * The CPU architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureVmDetails.VmArchitecture architecture = 14; + * @return int + */ + public function getArchitecture() + { + return $this->architecture; + } + + /** + * The CPU architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureVmDetails.VmArchitecture architecture = 14; + * @param int $var + * @return $this + */ + public function setArchitecture($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AzureVmDetails\VmArchitecture::class); + $this->architecture = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/BootOption.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/BootOption.php new file mode 100644 index 000000000000..32f00b38413d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/BootOption.php @@ -0,0 +1,64 @@ +google.cloud.vmmigration.v1.AzureVmDetails.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 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\AzureVmDetails_BootOption::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/Disk.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/Disk.php new file mode 100644 index 000000000000..92d7ad3f35dc --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/Disk.php @@ -0,0 +1,138 @@ +google.cloud.vmmigration.v1.AzureVmDetails.Disk + */ +class Disk extends \Google\Protobuf\Internal\Message +{ + /** + * The disk name. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The disk size in GB. + * + * Generated from protobuf field int32 size_gb = 2; + */ + protected $size_gb = 0; + /** + * The disk's Logical Unit Number (LUN). + * + * Generated from protobuf field int32 lun = 3; + */ + protected $lun = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The disk name. + * @type int $size_gb + * The disk size in GB. + * @type int $lun + * The disk's Logical Unit Number (LUN). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The disk name. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The disk 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 disk size in GB. + * + * Generated from protobuf field int32 size_gb = 2; + * @return int + */ + public function getSizeGb() + { + return $this->size_gb; + } + + /** + * The disk size in GB. + * + * Generated from protobuf field int32 size_gb = 2; + * @param int $var + * @return $this + */ + public function setSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->size_gb = $var; + + return $this; + } + + /** + * The disk's Logical Unit Number (LUN). + * + * Generated from protobuf field int32 lun = 3; + * @return int + */ + public function getLun() + { + return $this->lun; + } + + /** + * The disk's Logical Unit Number (LUN). + * + * Generated from protobuf field int32 lun = 3; + * @param int $var + * @return $this + */ + public function setLun($var) + { + GPBUtil::checkInt32($var); + $this->lun = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Disk::class, \Google\Cloud\VMMigration\V1\AzureVmDetails_Disk::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/OSDescription.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/OSDescription.php new file mode 100644 index 000000000000..4434e01a855e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/OSDescription.php @@ -0,0 +1,173 @@ +google.cloud.vmmigration.v1.AzureVmDetails.OSDescription + */ +class OSDescription extends \Google\Protobuf\Internal\Message +{ + /** + * OS type. + * + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + /** + * OS publisher. + * + * Generated from protobuf field string publisher = 2; + */ + protected $publisher = ''; + /** + * OS offer. + * + * Generated from protobuf field string offer = 3; + */ + protected $offer = ''; + /** + * OS plan. + * + * Generated from protobuf field string plan = 4; + */ + protected $plan = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * OS type. + * @type string $publisher + * OS publisher. + * @type string $offer + * OS offer. + * @type string $plan + * OS plan. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * OS type. + * + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * OS type. + * + * Generated from protobuf field string type = 1; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * OS publisher. + * + * Generated from protobuf field string publisher = 2; + * @return string + */ + public function getPublisher() + { + return $this->publisher; + } + + /** + * OS publisher. + * + * Generated from protobuf field string publisher = 2; + * @param string $var + * @return $this + */ + public function setPublisher($var) + { + GPBUtil::checkString($var, True); + $this->publisher = $var; + + return $this; + } + + /** + * OS offer. + * + * Generated from protobuf field string offer = 3; + * @return string + */ + public function getOffer() + { + return $this->offer; + } + + /** + * OS offer. + * + * Generated from protobuf field string offer = 3; + * @param string $var + * @return $this + */ + public function setOffer($var) + { + GPBUtil::checkString($var, True); + $this->offer = $var; + + return $this; + } + + /** + * OS plan. + * + * Generated from protobuf field string plan = 4; + * @return string + */ + public function getPlan() + { + return $this->plan; + } + + /** + * OS plan. + * + * Generated from protobuf field string plan = 4; + * @param string $var + * @return $this + */ + public function setPlan($var) + { + GPBUtil::checkString($var, True); + $this->plan = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OSDescription::class, \Google\Cloud\VMMigration\V1\AzureVmDetails_OSDescription::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/OSDisk.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/OSDisk.php new file mode 100644 index 000000000000..1dbc16b50bdb --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/OSDisk.php @@ -0,0 +1,138 @@ +google.cloud.vmmigration.v1.AzureVmDetails.OSDisk + */ +class OSDisk extends \Google\Protobuf\Internal\Message +{ + /** + * The disk's type. + * + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + /** + * The disk's full name. + * + * Generated from protobuf field string name = 2; + */ + protected $name = ''; + /** + * The disk's size in GB. + * + * Generated from protobuf field int32 size_gb = 3; + */ + protected $size_gb = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type + * The disk's type. + * @type string $name + * The disk's full name. + * @type int $size_gb + * The disk's size in GB. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The disk's type. + * + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The disk's type. + * + * Generated from protobuf field string type = 1; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * The disk's full name. + * + * Generated from protobuf field string name = 2; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The disk's full 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 disk's size in GB. + * + * Generated from protobuf field int32 size_gb = 3; + * @return int + */ + public function getSizeGb() + { + return $this->size_gb; + } + + /** + * The disk's size in GB. + * + * Generated from protobuf field int32 size_gb = 3; + * @param int $var + * @return $this + */ + public function setSizeGb($var) + { + GPBUtil::checkInt32($var); + $this->size_gb = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OSDisk::class, \Google\Cloud\VMMigration\V1\AzureVmDetails_OSDisk::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/PowerState.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/PowerState.php new file mode 100644 index 000000000000..ee188d5f2504 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/PowerState.php @@ -0,0 +1,99 @@ +google.cloud.vmmigration.v1.AzureVmDetails.PowerState + */ +class PowerState +{ + /** + * Power state is not specified. + * + * Generated from protobuf enum POWER_STATE_UNSPECIFIED = 0; + */ + const POWER_STATE_UNSPECIFIED = 0; + /** + * The VM is starting. + * + * Generated from protobuf enum STARTING = 1; + */ + const STARTING = 1; + /** + * The VM is running. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The VM is stopping. + * + * Generated from protobuf enum STOPPING = 3; + */ + const STOPPING = 3; + /** + * The VM is stopped. + * + * Generated from protobuf enum STOPPED = 4; + */ + const STOPPED = 4; + /** + * The VM is deallocating. + * + * Generated from protobuf enum DEALLOCATING = 5; + */ + const DEALLOCATING = 5; + /** + * The VM is deallocated. + * + * Generated from protobuf enum DEALLOCATED = 6; + */ + const DEALLOCATED = 6; + /** + * The VM's power state is unknown. + * + * Generated from protobuf enum UNKNOWN = 7; + */ + const UNKNOWN = 7; + + private static $valueToName = [ + self::POWER_STATE_UNSPECIFIED => 'POWER_STATE_UNSPECIFIED', + self::STARTING => 'STARTING', + self::RUNNING => 'RUNNING', + self::STOPPING => 'STOPPING', + self::STOPPED => 'STOPPED', + self::DEALLOCATING => 'DEALLOCATING', + self::DEALLOCATED => 'DEALLOCATED', + self::UNKNOWN => 'UNKNOWN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\AzureVmDetails_PowerState::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/VmArchitecture.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/VmArchitecture.php new file mode 100644 index 000000000000..c2c41b9a0a0a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/VmArchitecture.php @@ -0,0 +1,64 @@ +google.cloud.vmmigration.v1.AzureVmDetails.VmArchitecture + */ +class VmArchitecture +{ + /** + * The architecture is unknown. + * + * Generated from protobuf enum VM_ARCHITECTURE_UNSPECIFIED = 0; + */ + const VM_ARCHITECTURE_UNSPECIFIED = 0; + /** + * The architecture is one of the x86 architectures. + * + * Generated from protobuf enum VM_ARCHITECTURE_X86_FAMILY = 1; + */ + const VM_ARCHITECTURE_X86_FAMILY = 1; + /** + * The architecture is ARM64. + * + * Generated from protobuf enum VM_ARCHITECTURE_ARM64 = 2; + */ + const VM_ARCHITECTURE_ARM64 = 2; + + private static $valueToName = [ + self::VM_ARCHITECTURE_UNSPECIFIED => 'VM_ARCHITECTURE_UNSPECIFIED', + self::VM_ARCHITECTURE_X86_FAMILY => 'VM_ARCHITECTURE_X86_FAMILY', + self::VM_ARCHITECTURE_ARM64 => 'VM_ARCHITECTURE_ARM64', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\AzureVmDetails_VmArchitecture::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmsDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmsDetails.php new file mode 100644 index 000000000000..8f1c81fa9388 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmsDetails.php @@ -0,0 +1,67 @@ +google.cloud.vmmigration.v1.AzureVmsDetails + */ +class AzureVmsDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The details of the Azure VMs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AzureVmDetails details = 1; + */ + private $details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\AzureVmDetails>|\Google\Protobuf\Internal\RepeatedField $details + * The details of the Azure VMs. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The details of the Azure VMs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AzureVmDetails details = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDetails() + { + return $this->details; + } + + /** + * The details of the Azure VMs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AzureVmDetails details = 1; + * @param array<\Google\Cloud\VMMigration\V1\AzureVmDetails>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDetails($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\AzureVmDetails::class); + $this->details = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/BootConversion.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/BootConversion.php new file mode 100644 index 000000000000..1e75432ce83e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/BootConversion.php @@ -0,0 +1,61 @@ +google.cloud.vmmigration.v1.BootConversion + */ +class BootConversion +{ + /** + * Unspecified conversion type. + * + * Generated from protobuf enum BOOT_CONVERSION_UNSPECIFIED = 0; + */ + const BOOT_CONVERSION_UNSPECIFIED = 0; + /** + * No conversion. + * + * Generated from protobuf enum NONE = 1; + */ + const NONE = 1; + /** + * Convert from BIOS to EFI. + * + * Generated from protobuf enum BIOS_TO_EFI = 2; + */ + const BIOS_TO_EFI = 2; + + private static $valueToName = [ + self::BOOT_CONVERSION_UNSPECIFIED => 'BOOT_CONVERSION_UNSPECIFIED', + self::NONE => 'NONE', + self::BIOS_TO_EFI => 'BIOS_TO_EFI', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + 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/BootDiskDefaults.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/BootDiskDefaults.php new file mode 100644 index 000000000000..52ed5521fe22 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/BootDiskDefaults.php @@ -0,0 +1,241 @@ +google.cloud.vmmigration.v1.BootDiskDefaults + */ +class BootDiskDefaults extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The name of the disk. + * + * Generated from protobuf field string disk_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disk_name = ''; + /** + * Optional. The type of disk provisioning to use for the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disk_type = 0; + /** + * Optional. Specifies a unique device name of your choice that is reflected + * into the /dev/disk/by-id/google-* tree of a Linux operating system running + * within the instance. If not specified, the server chooses a default device + * name to apply to this disk, in the form persistent-disk-x, where x is a + * number assigned by Google Compute Engine. This field is only applicable for + * persistent disks. + * + * Generated from protobuf field string device_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $device_name = ''; + /** + * Optional. The encryption to apply to the boot disk. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encryption = null; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\BootDiskDefaults\DiskImageDefaults $image + * The image to use when creating the disk. + * @type string $disk_name + * Optional. The name of the disk. + * @type int $disk_type + * Optional. The type of disk provisioning to use for the VM. + * @type string $device_name + * Optional. Specifies a unique device name of your choice that is reflected + * into the /dev/disk/by-id/google-* tree of a Linux operating system running + * within the instance. If not specified, the server chooses a default device + * name to apply to this disk, in the form persistent-disk-x, where x is a + * number assigned by Google Compute Engine. This field is only applicable for + * persistent disks. + * @type \Google\Cloud\VMMigration\V1\Encryption $encryption + * Optional. The encryption to apply to the boot disk. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The image to use when creating the disk. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.BootDiskDefaults.DiskImageDefaults image = 3; + * @return \Google\Cloud\VMMigration\V1\BootDiskDefaults\DiskImageDefaults|null + */ + public function getImage() + { + return $this->readOneof(3); + } + + public function hasImage() + { + return $this->hasOneof(3); + } + + /** + * The image to use when creating the disk. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.BootDiskDefaults.DiskImageDefaults image = 3; + * @param \Google\Cloud\VMMigration\V1\BootDiskDefaults\DiskImageDefaults $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\BootDiskDefaults\DiskImageDefaults::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. The name of the disk. + * + * Generated from protobuf field string disk_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDiskName() + { + return $this->disk_name; + } + + /** + * Optional. The name of the disk. + * + * Generated from protobuf field string disk_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDiskName($var) + { + GPBUtil::checkString($var, True); + $this->disk_name = $var; + + return $this; + } + + /** + * Optional. The type of disk provisioning to use for the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getDiskType() + { + return $this->disk_type; + } + + /** + * Optional. The type of disk provisioning to use for the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setDiskType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineDiskType::class); + $this->disk_type = $var; + + return $this; + } + + /** + * Optional. Specifies a unique device name of your choice that is reflected + * into the /dev/disk/by-id/google-* tree of a Linux operating system running + * within the instance. If not specified, the server chooses a default device + * name to apply to this disk, in the form persistent-disk-x, where x is a + * number assigned by Google Compute Engine. This field is only applicable for + * persistent disks. + * + * Generated from protobuf field string device_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDeviceName() + { + return $this->device_name; + } + + /** + * Optional. Specifies a unique device name of your choice that is reflected + * into the /dev/disk/by-id/google-* tree of a Linux operating system running + * within the instance. If not specified, the server chooses a default device + * name to apply to this disk, in the form persistent-disk-x, where x is a + * number assigned by Google Compute Engine. This field is only applicable for + * persistent disks. + * + * Generated from protobuf field string device_name = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDeviceName($var) + { + GPBUtil::checkString($var, True); + $this->device_name = $var; + + return $this; + } + + /** + * Optional. The encryption to apply to the boot disk. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VMMigration\V1\Encryption|null + */ + public function getEncryption() + { + return $this->encryption; + } + + public function hasEncryption() + { + return isset($this->encryption); + } + + public function clearEncryption() + { + unset($this->encryption); + } + + /** + * Optional. The encryption to apply to the boot disk. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VMMigration\V1\Encryption $var + * @return $this + */ + public function setEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Encryption::class); + $this->encryption = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/BootDiskDefaults/DiskImageDefaults.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/BootDiskDefaults/DiskImageDefaults.php new file mode 100644 index 000000000000..40ea54e2b07a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/BootDiskDefaults/DiskImageDefaults.php @@ -0,0 +1,70 @@ +google.cloud.vmmigration.v1.BootDiskDefaults.DiskImageDefaults + */ +class DiskImageDefaults extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The Image resource used when creating the disk. + * + * Generated from protobuf field string source_image = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $source_image = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source_image + * Required. The Image resource used when creating the disk. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The Image resource used when creating the disk. + * + * Generated from protobuf field string source_image = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getSourceImage() + { + return $this->source_image; + } + + /** + * Required. The Image resource used when creating the disk. + * + * Generated from protobuf field string source_image = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSourceImage($var) + { + GPBUtil::checkString($var, True); + $this->source_image = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DiskImageDefaults::class, \Google\Cloud\VMMigration\V1\BootDiskDefaults_DiskImageDefaults::class); + 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/CancelDiskMigrationJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelDiskMigrationJobRequest.php new file mode 100644 index 000000000000..33e99e09a194 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelDiskMigrationJobRequest.php @@ -0,0 +1,67 @@ +google.cloud.vmmigration.v1.CancelDiskMigrationJobRequest + */ +class CancelDiskMigrationJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the DiskMigrationJob. + * + * 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 name of the DiskMigrationJob. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the DiskMigrationJob. + * + * Generated from 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 DiskMigrationJob. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @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/CancelDiskMigrationJobResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelDiskMigrationJobResponse.php new file mode 100644 index 000000000000..0fe0cd402312 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelDiskMigrationJobResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.CancelDiskMigrationJobResponse + */ +class CancelDiskMigrationJobResponse 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/CancelImageImportJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelImageImportJobRequest.php new file mode 100644 index 000000000000..918dd623d421 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelImageImportJobRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.CancelImageImportJobRequest + */ +class CancelImageImportJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The image import 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 image import job id. Please see + * {@see VmMigrationClient::imageImportJobName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\CancelImageImportJobRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The image import job id. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The image import 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 image import 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/CancelImageImportJobResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelImageImportJobResponse.php new file mode 100644 index 000000000000..3a713004b420 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelImageImportJobResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.CancelImageImportJobResponse + */ +class CancelImageImportJobResponse 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..bf8700fea7bc --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob.php @@ -0,0 +1,403 @@ +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\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails $compute_engine_disks_target_details + * Output only. Details of the target Persistent Disks 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. Details of the target Persistent Disks in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDisksTargetDetails compute_engine_disks_target_details = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails|null + */ + public function getComputeEngineDisksTargetDetails() + { + return $this->readOneof(25); + } + + public function hasComputeEngineDisksTargetDetails() + { + return $this->hasOneof(25); + } + + /** + * Output only. Details of the target Persistent Disks in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDisksTargetDetails compute_engine_disks_target_details = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails $var + * @return $this + */ + public function setComputeEngineDisksTargetDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails::class); + $this->writeOneof(25, $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/ComputeEngineDisk.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDisk.php new file mode 100644 index 000000000000..188196a23b44 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDisk.php @@ -0,0 +1,193 @@ +google.cloud.vmmigration.v1.ComputeEngineDisk + */ +class ComputeEngineDisk extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Target Compute Engine Disk ID. + * This is the resource ID segment of the Compute Engine Disk to create. + * In the resource name compute/v1/projects/{project}/zones/{zone}/disks/disk1 + * "disk1" is the resource ID for the disk. + * + * Generated from protobuf field string disk_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disk_id = ''; + /** + * Required. The Compute Engine zone in which to create the disk. Should be of + * the form: projects/{target-project}/locations/{zone} + * + * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $zone = ''; + /** + * Optional. Replication zones of the regional disk. Should be of the form: + * projects/{target-project}/locations/{replica-zone} + * Currently only one replica zone is supported. + * + * Generated from protobuf field repeated string replica_zones = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $replica_zones; + /** + * Required. The disk type to use. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $disk_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $disk_id + * Optional. Target Compute Engine Disk ID. + * This is the resource ID segment of the Compute Engine Disk to create. + * In the resource name compute/v1/projects/{project}/zones/{zone}/disks/disk1 + * "disk1" is the resource ID for the disk. + * @type string $zone + * Required. The Compute Engine zone in which to create the disk. Should be of + * the form: projects/{target-project}/locations/{zone} + * @type array|\Google\Protobuf\Internal\RepeatedField $replica_zones + * Optional. Replication zones of the regional disk. Should be of the form: + * projects/{target-project}/locations/{replica-zone} + * Currently only one replica zone is supported. + * @type int $disk_type + * Required. The disk type to use. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Target Compute Engine Disk ID. + * This is the resource ID segment of the Compute Engine Disk to create. + * In the resource name compute/v1/projects/{project}/zones/{zone}/disks/disk1 + * "disk1" is the resource ID for the disk. + * + * Generated from protobuf field string disk_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDiskId() + { + return $this->disk_id; + } + + /** + * Optional. Target Compute Engine Disk ID. + * This is the resource ID segment of the Compute Engine Disk to create. + * In the resource name compute/v1/projects/{project}/zones/{zone}/disks/disk1 + * "disk1" is the resource ID for the disk. + * + * Generated from protobuf field string disk_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDiskId($var) + { + GPBUtil::checkString($var, True); + $this->disk_id = $var; + + return $this; + } + + /** + * Required. The Compute Engine zone in which to create the disk. Should be of + * the form: projects/{target-project}/locations/{zone} + * + * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getZone() + { + return $this->zone; + } + + /** + * Required. The Compute Engine zone in which to create the disk. Should be of + * the form: projects/{target-project}/locations/{zone} + * + * Generated from protobuf field string zone = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->zone = $var; + + return $this; + } + + /** + * Optional. Replication zones of the regional disk. Should be of the form: + * projects/{target-project}/locations/{replica-zone} + * Currently only one replica zone is supported. + * + * Generated from protobuf field repeated string replica_zones = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReplicaZones() + { + return $this->replica_zones; + } + + /** + * Optional. Replication zones of the regional disk. Should be of the form: + * projects/{target-project}/locations/{replica-zone} + * Currently only one replica zone is supported. + * + * Generated from protobuf field repeated string replica_zones = 3 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReplicaZones($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->replica_zones = $arr; + + return $this; + } + + /** + * Required. The disk type to use. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getDiskType() + { + return $this->disk_type; + } + + /** + * Required. The disk type to use. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setDiskType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineDiskType::class); + $this->disk_type = $var; + + return $this; + } + +} + 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..4126616e99b2 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDiskType.php @@ -0,0 +1,76 @@ +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; + /** + * Hyperdisk balanced disk type. + * + * Generated from protobuf enum COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED = 4; + */ + const COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED = 4; + + 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', + self::COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED => 'COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_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/ComputeEngineDisksTargetDefaults.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDisksTargetDefaults.php new file mode 100644 index 000000000000..6766a6140667 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDisksTargetDefaults.php @@ -0,0 +1,223 @@ +google.cloud.vmmigration.v1.ComputeEngineDisksTargetDefaults + */ +class ComputeEngineDisksTargetDefaults extends \Google\Protobuf\Internal\Message +{ + /** + * The full path of the resource of type TargetProject which represents the + * Compute Engine project in which to create the Persistent Disks. + * + * Generated from protobuf field string target_project = 1 [(.google.api.resource_reference) = { + */ + protected $target_project = ''; + /** + * The details of each Persistent Disk to create. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.PersistentDiskDefaults disks = 4; + */ + private $disks; + protected $location; + protected $vm_target; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $zone + * The zone in which to create the Persistent Disks. + * @type \Google\Cloud\VMMigration\V1\DisksMigrationDisksTargetDefaults $disks_target_defaults + * Details of the disk only migration target. + * @type \Google\Cloud\VMMigration\V1\DisksMigrationVmTargetDefaults $vm_target_defaults + * Details of the VM migration target. + * @type string $target_project + * The full path of the resource of type TargetProject which represents the + * Compute Engine project in which to create the Persistent Disks. + * @type array<\Google\Cloud\VMMigration\V1\PersistentDiskDefaults>|\Google\Protobuf\Internal\RepeatedField $disks + * The details of each Persistent Disk to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The zone in which to create the Persistent Disks. + * + * Generated from protobuf field string zone = 2; + * @return string + */ + public function getZone() + { + return $this->readOneof(2); + } + + public function hasZone() + { + return $this->hasOneof(2); + } + + /** + * The zone in which to create the Persistent Disks. + * + * Generated from protobuf field string zone = 2; + * @param string $var + * @return $this + */ + public function setZone($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Details of the disk only migration target. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DisksMigrationDisksTargetDefaults disks_target_defaults = 5; + * @return \Google\Cloud\VMMigration\V1\DisksMigrationDisksTargetDefaults|null + */ + public function getDisksTargetDefaults() + { + return $this->readOneof(5); + } + + public function hasDisksTargetDefaults() + { + return $this->hasOneof(5); + } + + /** + * Details of the disk only migration target. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DisksMigrationDisksTargetDefaults disks_target_defaults = 5; + * @param \Google\Cloud\VMMigration\V1\DisksMigrationDisksTargetDefaults $var + * @return $this + */ + public function setDisksTargetDefaults($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\DisksMigrationDisksTargetDefaults::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Details of the VM migration target. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DisksMigrationVmTargetDefaults vm_target_defaults = 6; + * @return \Google\Cloud\VMMigration\V1\DisksMigrationVmTargetDefaults|null + */ + public function getVmTargetDefaults() + { + return $this->readOneof(6); + } + + public function hasVmTargetDefaults() + { + return $this->hasOneof(6); + } + + /** + * Details of the VM migration target. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DisksMigrationVmTargetDefaults vm_target_defaults = 6; + * @param \Google\Cloud\VMMigration\V1\DisksMigrationVmTargetDefaults $var + * @return $this + */ + public function setVmTargetDefaults($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\DisksMigrationVmTargetDefaults::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * The full path of the resource of type TargetProject which represents the + * Compute Engine project in which to create the Persistent Disks. + * + * Generated from protobuf field string target_project = 1 [(.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 the Persistent Disks. + * + * Generated from protobuf field string target_project = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTargetProject($var) + { + GPBUtil::checkString($var, True); + $this->target_project = $var; + + return $this; + } + + /** + * The details of each Persistent Disk to create. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.PersistentDiskDefaults disks = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDisks() + { + return $this->disks; + } + + /** + * The details of each Persistent Disk to create. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.PersistentDiskDefaults disks = 4; + * @param array<\Google\Cloud\VMMigration\V1\PersistentDiskDefaults>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDisks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\PersistentDiskDefaults::class); + $this->disks = $arr; + + return $this; + } + + /** + * @return string + */ + public function getLocation() + { + return $this->whichOneof("location"); + } + + /** + * @return string + */ + public function getVmTarget() + { + return $this->whichOneof("vm_target"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDisksTargetDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDisksTargetDetails.php new file mode 100644 index 000000000000..de2205fb2a1d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDisksTargetDetails.php @@ -0,0 +1,143 @@ +google.cloud.vmmigration.v1.ComputeEngineDisksTargetDetails + */ +class ComputeEngineDisksTargetDetails extends \Google\Protobuf\Internal\Message +{ + /** + * The details of each created Persistent Disk. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.PersistentDisk disks = 1; + */ + private $disks; + protected $vm_target; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\DisksMigrationDisksTargetDetails $disks_target_details + * Details of the disks-only migration target. + * @type \Google\Cloud\VMMigration\V1\DisksMigrationVmTargetDetails $vm_target_details + * Details for the VM the migrated data disks are attached to. + * @type array<\Google\Cloud\VMMigration\V1\PersistentDisk>|\Google\Protobuf\Internal\RepeatedField $disks + * The details of each created Persistent Disk. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Details of the disks-only migration target. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DisksMigrationDisksTargetDetails disks_target_details = 5; + * @return \Google\Cloud\VMMigration\V1\DisksMigrationDisksTargetDetails|null + */ + public function getDisksTargetDetails() + { + return $this->readOneof(5); + } + + public function hasDisksTargetDetails() + { + return $this->hasOneof(5); + } + + /** + * Details of the disks-only migration target. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DisksMigrationDisksTargetDetails disks_target_details = 5; + * @param \Google\Cloud\VMMigration\V1\DisksMigrationDisksTargetDetails $var + * @return $this + */ + public function setDisksTargetDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\DisksMigrationDisksTargetDetails::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Details for the VM the migrated data disks are attached to. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DisksMigrationVmTargetDetails vm_target_details = 6; + * @return \Google\Cloud\VMMigration\V1\DisksMigrationVmTargetDetails|null + */ + public function getVmTargetDetails() + { + return $this->readOneof(6); + } + + public function hasVmTargetDetails() + { + return $this->hasOneof(6); + } + + /** + * Details for the VM the migrated data disks are attached to. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DisksMigrationVmTargetDetails vm_target_details = 6; + * @param \Google\Cloud\VMMigration\V1\DisksMigrationVmTargetDetails $var + * @return $this + */ + public function setVmTargetDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\DisksMigrationVmTargetDetails::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * The details of each created Persistent Disk. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.PersistentDisk disks = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDisks() + { + return $this->disks; + } + + /** + * The details of each created Persistent Disk. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.PersistentDisk disks = 1; + * @param array<\Google\Cloud\VMMigration\V1\PersistentDisk>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDisks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\PersistentDisk::class); + $this->disks = $arr; + + return $this; + } + + /** + * @return string + */ + public function getVmTarget() + { + return $this->whichOneof("vm_target"); + } + +} + 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/ComputeEngineNetworkTier.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineNetworkTier.php new file mode 100644 index 000000000000..d1097ea59490 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineNetworkTier.php @@ -0,0 +1,62 @@ +google.cloud.vmmigration.v1.ComputeEngineNetworkTier + */ +class ComputeEngineNetworkTier +{ + /** + * An unspecified network tier. Will be used as PREMIUM. + * + * Generated from protobuf enum COMPUTE_ENGINE_NETWORK_TIER_UNSPECIFIED = 0; + */ + const COMPUTE_ENGINE_NETWORK_TIER_UNSPECIFIED = 0; + /** + * A standard network tier. + * + * Generated from protobuf enum NETWORK_TIER_STANDARD = 1; + */ + const NETWORK_TIER_STANDARD = 1; + /** + * A premium network tier. + * + * Generated from protobuf enum NETWORK_TIER_PREMIUM = 2; + */ + const NETWORK_TIER_PREMIUM = 2; + + private static $valueToName = [ + self::COMPUTE_ENGINE_NETWORK_TIER_UNSPECIFIED => 'COMPUTE_ENGINE_NETWORK_TIER_UNSPECIFIED', + self::NETWORK_TIER_STANDARD => 'NETWORK_TIER_STANDARD', + self::NETWORK_TIER_PREMIUM => 'NETWORK_TIER_PREMIUM', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + 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..1d991762eeac --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDefaults.php @@ -0,0 +1,906 @@ +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 list 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; + /** + * Optional. The service account to associate the VM with. + * + * Generated from protobuf field string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + 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; + /** + * Optional. Defines whether the instance has vTPM enabled. + * This can be set to true only if the VM boot option is EFI. + * + * Generated from protobuf field bool enable_vtpm = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_vtpm = false; + /** + * Optional. Defines whether the instance has integrity monitoring enabled. + * This can be set to true only if the VM boot option is EFI, and vTPM is + * enabled. + * + * Generated from protobuf field bool enable_integrity_monitoring = 22 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_integrity_monitoring = 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 = ''; + /** + * Optional. Immutable. The encryption to apply to the VM disks. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $encryption = null; + /** + * Optional. By default the virtual machine will keep its existing boot + * option. Setting this property will trigger an internal process which will + * convert the virtual machine from using the existing boot option to another. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $boot_conversion = 0; + /** + * Optional. Additional replica zones of the target regional disks. + * If this list is not empty a regional disk will be created. The first + * supported zone would be the one stated in the + * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDefaults.zone] field. + * The rest are taken from this list. Please refer to the [regional disk + * creation + * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) + * for further details about regional vs zonal disks. If not specified, a + * zonal disk will be created in the same zone the VM is created. + * + * Generated from protobuf field repeated string disk_replica_zones = 24 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $disk_replica_zones; + + /** + * 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 list 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 + * Optional. 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 bool $enable_vtpm + * Optional. Defines whether the instance has vTPM enabled. + * This can be set to true only if the VM boot option is EFI. + * @type bool $enable_integrity_monitoring + * Optional. Defines whether the instance has integrity monitoring enabled. + * This can be set to true only if the VM boot option is EFI, and vTPM is + * enabled. + * @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. + * @type \Google\Cloud\VMMigration\V1\Encryption $encryption + * Optional. Immutable. The encryption to apply to the VM disks. + * @type int $boot_conversion + * Optional. By default the virtual machine will keep its existing boot + * option. Setting this property will trigger an internal process which will + * convert the virtual machine from using the existing boot option to another. + * @type array|\Google\Protobuf\Internal\RepeatedField $disk_replica_zones + * Optional. Additional replica zones of the target regional disks. + * If this list is not empty a regional disk will be created. The first + * supported zone would be the one stated in the + * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDefaults.zone] field. + * The rest are taken from this list. Please refer to the [regional disk + * creation + * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) + * for further details about regional vs zonal disks. If not specified, a + * zonal disk will be created in the same zone the VM is created. + * } + */ + 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 list 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 list 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; + } + + /** + * Optional. The service account to associate the VM with. + * + * Generated from protobuf field string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Optional. The service account to associate the VM with. + * + * Generated from protobuf field string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @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; + } + + /** + * Optional. Defines whether the instance has vTPM enabled. + * This can be set to true only if the VM boot option is EFI. + * + * Generated from protobuf field bool enable_vtpm = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableVtpm() + { + return $this->enable_vtpm; + } + + /** + * Optional. Defines whether the instance has vTPM enabled. + * This can be set to true only if the VM boot option is EFI. + * + * Generated from protobuf field bool enable_vtpm = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableVtpm($var) + { + GPBUtil::checkBool($var); + $this->enable_vtpm = $var; + + return $this; + } + + /** + * Optional. Defines whether the instance has integrity monitoring enabled. + * This can be set to true only if the VM boot option is EFI, and vTPM is + * enabled. + * + * Generated from protobuf field bool enable_integrity_monitoring = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableIntegrityMonitoring() + { + return $this->enable_integrity_monitoring; + } + + /** + * Optional. Defines whether the instance has integrity monitoring enabled. + * This can be set to true only if the VM boot option is EFI, and vTPM is + * enabled. + * + * Generated from protobuf field bool enable_integrity_monitoring = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableIntegrityMonitoring($var) + { + GPBUtil::checkBool($var); + $this->enable_integrity_monitoring = $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; + } + + /** + * Optional. Immutable. The encryption to apply to the VM disks. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\VMMigration\V1\Encryption|null + */ + public function getEncryption() + { + return $this->encryption; + } + + public function hasEncryption() + { + return isset($this->encryption); + } + + public function clearEncryption() + { + unset($this->encryption); + } + + /** + * Optional. Immutable. The encryption to apply to the VM disks. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\VMMigration\V1\Encryption $var + * @return $this + */ + public function setEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Encryption::class); + $this->encryption = $var; + + return $this; + } + + /** + * Optional. By default the virtual machine will keep its existing boot + * option. Setting this property will trigger an internal process which will + * convert the virtual machine from using the existing boot option to another. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getBootConversion() + { + return $this->boot_conversion; + } + + /** + * Optional. By default the virtual machine will keep its existing boot + * option. Setting this property will trigger an internal process which will + * convert the virtual machine from using the existing boot option to another. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setBootConversion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\BootConversion::class); + $this->boot_conversion = $var; + + return $this; + } + + /** + * Optional. Additional replica zones of the target regional disks. + * If this list is not empty a regional disk will be created. The first + * supported zone would be the one stated in the + * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDefaults.zone] field. + * The rest are taken from this list. Please refer to the [regional disk + * creation + * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) + * for further details about regional vs zonal disks. If not specified, a + * zonal disk will be created in the same zone the VM is created. + * + * Generated from protobuf field repeated string disk_replica_zones = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDiskReplicaZones() + { + return $this->disk_replica_zones; + } + + /** + * Optional. Additional replica zones of the target regional disks. + * If this list is not empty a regional disk will be created. The first + * supported zone would be the one stated in the + * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDefaults.zone] field. + * The rest are taken from this list. Please refer to the [regional disk + * creation + * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) + * for further details about regional vs zonal disks. If not specified, a + * zonal disk will be created in the same zone the VM is created. + * + * Generated from protobuf field repeated string disk_replica_zones = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDiskReplicaZones($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->disk_replica_zones = $arr; + + 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..c014aa71e572 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDetails.php @@ -0,0 +1,890 @@ +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 list 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; + /** + * Optional. Defines whether the instance has vTPM enabled. + * + * Generated from protobuf field bool enable_vtpm = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_vtpm = false; + /** + * Optional. Defines whether the instance has integrity monitoring enabled. + * + * Generated from protobuf field bool enable_integrity_monitoring = 22 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_integrity_monitoring = 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 = ''; + /** + * Optional. The encryption to apply to the VM disks. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encryption = null; + /** + * Optional. By default the virtual machine will keep its existing boot + * option. Setting this property will trigger an internal process which will + * convert the virtual machine from using the existing boot option to another. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $boot_conversion = 0; + /** + * Optional. Additional replica zones of the target regional disks. + * If this list is not empty a regional disk will be created. The first + * supported zone would be the one stated in the + * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDetails.zone] field. + * The rest are taken from this list. Please refer to the [regional disk + * creation + * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) + * for further details about regional vs zonal disks. If not specified, a + * zonal disk will be created in the same zone the VM is created. + * + * Generated from protobuf field repeated string disk_replica_zones = 24 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $disk_replica_zones; + + /** + * 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 list 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 bool $enable_vtpm + * Optional. Defines whether the instance has vTPM enabled. + * @type bool $enable_integrity_monitoring + * Optional. Defines whether the instance has integrity monitoring enabled. + * @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. + * @type \Google\Cloud\VMMigration\V1\Encryption $encryption + * Optional. The encryption to apply to the VM disks. + * @type int $boot_conversion + * Optional. By default the virtual machine will keep its existing boot + * option. Setting this property will trigger an internal process which will + * convert the virtual machine from using the existing boot option to another. + * @type array|\Google\Protobuf\Internal\RepeatedField $disk_replica_zones + * Optional. Additional replica zones of the target regional disks. + * If this list is not empty a regional disk will be created. The first + * supported zone would be the one stated in the + * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDetails.zone] field. + * The rest are taken from this list. Please refer to the [regional disk + * creation + * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) + * for further details about regional vs zonal disks. If not specified, a + * zonal disk will be created in the same zone the VM is created. + * } + */ + 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 list 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 list 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; + } + + /** + * Optional. Defines whether the instance has vTPM enabled. + * + * Generated from protobuf field bool enable_vtpm = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableVtpm() + { + return $this->enable_vtpm; + } + + /** + * Optional. Defines whether the instance has vTPM enabled. + * + * Generated from protobuf field bool enable_vtpm = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableVtpm($var) + { + GPBUtil::checkBool($var); + $this->enable_vtpm = $var; + + return $this; + } + + /** + * Optional. Defines whether the instance has integrity monitoring enabled. + * + * Generated from protobuf field bool enable_integrity_monitoring = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableIntegrityMonitoring() + { + return $this->enable_integrity_monitoring; + } + + /** + * Optional. Defines whether the instance has integrity monitoring enabled. + * + * Generated from protobuf field bool enable_integrity_monitoring = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableIntegrityMonitoring($var) + { + GPBUtil::checkBool($var); + $this->enable_integrity_monitoring = $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; + } + + /** + * Optional. The encryption to apply to the VM disks. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VMMigration\V1\Encryption|null + */ + public function getEncryption() + { + return $this->encryption; + } + + public function hasEncryption() + { + return isset($this->encryption); + } + + public function clearEncryption() + { + unset($this->encryption); + } + + /** + * Optional. The encryption to apply to the VM disks. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VMMigration\V1\Encryption $var + * @return $this + */ + public function setEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Encryption::class); + $this->encryption = $var; + + return $this; + } + + /** + * Optional. By default the virtual machine will keep its existing boot + * option. Setting this property will trigger an internal process which will + * convert the virtual machine from using the existing boot option to another. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getBootConversion() + { + return $this->boot_conversion; + } + + /** + * Optional. By default the virtual machine will keep its existing boot + * option. Setting this property will trigger an internal process which will + * convert the virtual machine from using the existing boot option to another. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setBootConversion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\BootConversion::class); + $this->boot_conversion = $var; + + return $this; + } + + /** + * Optional. Additional replica zones of the target regional disks. + * If this list is not empty a regional disk will be created. The first + * supported zone would be the one stated in the + * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDetails.zone] field. + * The rest are taken from this list. Please refer to the [regional disk + * creation + * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) + * for further details about regional vs zonal disks. If not specified, a + * zonal disk will be created in the same zone the VM is created. + * + * Generated from protobuf field repeated string disk_replica_zones = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDiskReplicaZones() + { + return $this->disk_replica_zones; + } + + /** + * Optional. Additional replica zones of the target regional disks. + * If this list is not empty a regional disk will be created. The first + * supported zone would be the one stated in the + * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDetails.zone] field. + * The rest are taken from this list. Please refer to the [regional disk + * creation + * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) + * for further details about regional vs zonal disks. If not specified, a + * zonal disk will be created in the same zone the VM is created. + * + * Generated from protobuf field repeated string disk_replica_zones = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDiskReplicaZones($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->disk_replica_zones = $arr; + + 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..2c038f9ccb9c --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling.php @@ -0,0 +1,208 @@ +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/CopyingSourceDiskSnapshotStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CopyingSourceDiskSnapshotStep.php new file mode 100644 index 000000000000..82517363cd5e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CopyingSourceDiskSnapshotStep.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.CopyingSourceDiskSnapshotStep + */ +class CopyingSourceDiskSnapshotStep 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/CreateCloneJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateCloneJobRequest.php new file mode 100644 index 000000000000..119c3418d7ff --- /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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a 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/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..041fd4c6d145 --- /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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a 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/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..06e5d91a6460 --- /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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDiskMigrationJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDiskMigrationJobRequest.php new file mode 100644 index 000000000000..7539c64666a6 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDiskMigrationJobRequest.php @@ -0,0 +1,252 @@ +google.cloud.vmmigration.v1.CreateDiskMigrationJobRequest + */ +class CreateDiskMigrationJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The DiskMigrationJob's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The DiskMigrationJob identifier. + * The maximum length of this value is 63 characters. + * Valid characters are lower case Latin letters, digits and hyphen. + * It must start with a Latin letter and must not end with a hyphen. + * + * Generated from protobuf field string disk_migration_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $disk_migration_job_id = ''; + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DiskMigrationJob disk_migration_job = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $disk_migration_job = 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 timed out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a 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, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param string $parent Required. The DiskMigrationJob's parent. Please see + * {@see VmMigrationClient::sourceName()} for help formatting this field. + * @param \Google\Cloud\VMMigration\V1\DiskMigrationJob $diskMigrationJob Required. The create request body. + * @param string $diskMigrationJobId Required. The DiskMigrationJob identifier. + * The maximum length of this value is 63 characters. + * Valid characters are lower case Latin letters, digits and hyphen. + * It must start with a Latin letter and must not end with a hyphen. + * + * @return \Google\Cloud\VMMigration\V1\CreateDiskMigrationJobRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VMMigration\V1\DiskMigrationJob $diskMigrationJob, string $diskMigrationJobId): self + { + return (new self()) + ->setParent($parent) + ->setDiskMigrationJob($diskMigrationJob) + ->setDiskMigrationJobId($diskMigrationJobId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The DiskMigrationJob's parent. + * @type string $disk_migration_job_id + * Required. The DiskMigrationJob identifier. + * The maximum length of this value is 63 characters. + * Valid characters are lower case Latin letters, digits and hyphen. + * It must start with a Latin letter and must not end with a hyphen. + * @type \Google\Cloud\VMMigration\V1\DiskMigrationJob $disk_migration_job + * Required. The create request body. + * @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 timed out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 DiskMigrationJob'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 DiskMigrationJob'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 DiskMigrationJob identifier. + * The maximum length of this value is 63 characters. + * Valid characters are lower case Latin letters, digits and hyphen. + * It must start with a Latin letter and must not end with a hyphen. + * + * Generated from protobuf field string disk_migration_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDiskMigrationJobId() + { + return $this->disk_migration_job_id; + } + + /** + * Required. The DiskMigrationJob identifier. + * The maximum length of this value is 63 characters. + * Valid characters are lower case Latin letters, digits and hyphen. + * It must start with a Latin letter and must not end with a hyphen. + * + * Generated from protobuf field string disk_migration_job_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDiskMigrationJobId($var) + { + GPBUtil::checkString($var, True); + $this->disk_migration_job_id = $var; + + return $this; + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DiskMigrationJob disk_migration_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\DiskMigrationJob|null + */ + public function getDiskMigrationJob() + { + return $this->disk_migration_job; + } + + public function hasDiskMigrationJob() + { + return isset($this->disk_migration_job); + } + + public function clearDiskMigrationJob() + { + unset($this->disk_migration_job); + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DiskMigrationJob disk_migration_job = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\DiskMigrationJob $var + * @return $this + */ + public function setDiskMigrationJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\DiskMigrationJob::class); + $this->disk_migration_job = $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 timed out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a 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, (.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 timed out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a 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, (.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/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..6364b1934cb1 --- /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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateImageImportRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateImageImportRequest.php new file mode 100644 index 000000000000..934b71d47be6 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateImageImportRequest.php @@ -0,0 +1,252 @@ +google.cloud.vmmigration.v1.CreateImageImportRequest + */ +class CreateImageImportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ImageImport's parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The image import identifier. + * 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 image_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $image_import_id = ''; + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ImageImport image_import = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $image_import = 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 ImageImport's parent. Please see + * {@see VmMigrationClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VMMigration\V1\ImageImport $imageImport Required. The create request body. + * @param string $imageImportId Required. The image import identifier. + * 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\CreateImageImportRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VMMigration\V1\ImageImport $imageImport, string $imageImportId): self + { + return (new self()) + ->setParent($parent) + ->setImageImport($imageImport) + ->setImageImportId($imageImportId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The ImageImport's parent. + * @type string $image_import_id + * Required. The image import identifier. + * 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 \Google\Cloud\VMMigration\V1\ImageImport $image_import + * Required. The create request body. + * @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\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ImageImport'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 ImageImport'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 image import identifier. + * 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 image_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getImageImportId() + { + return $this->image_import_id; + } + + /** + * Required. The image import identifier. + * 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 image_import_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setImageImportId($var) + { + GPBUtil::checkString($var, True); + $this->image_import_id = $var; + + return $this; + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ImageImport image_import = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\ImageImport|null + */ + public function getImageImport() + { + return $this->image_import; + } + + public function hasImageImport() + { + return isset($this->image_import); + } + + public function clearImageImport() + { + unset($this->image_import); + } + + /** + * Required. The create request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ImageImport image_import = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\ImageImport $var + * @return $this + */ + public function setImageImport($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ImageImport::class); + $this->image_import = $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/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..58176266340b --- /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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a 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/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..1ead753254f4 --- /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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a 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/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..c8933d912aa1 --- /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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a 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/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..4e9e80122c18 --- /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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreatingImageStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreatingImageStep.php new file mode 100644 index 000000000000..631508c9810b --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreatingImageStep.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.CreatingImageStep + */ +class CreatingImageStep 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/CreatingSourceDiskSnapshotStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreatingSourceDiskSnapshotStep.php new file mode 100644 index 000000000000..ce5253fecc40 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreatingSourceDiskSnapshotStep.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.CreatingSourceDiskSnapshotStep + */ +class CreatingSourceDiskSnapshotStep 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/CutoverForecast.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverForecast.php new file mode 100644 index 000000000000..27e0fd954c03 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverForecast.php @@ -0,0 +1,77 @@ +google.cloud.vmmigration.v1.CutoverForecast + */ +class CutoverForecast extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Estimation of the CutoverJob duration. + * + * Generated from protobuf field .google.protobuf.Duration estimated_cutover_job_duration = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $estimated_cutover_job_duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $estimated_cutover_job_duration + * Output only. Estimation of the CutoverJob duration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Estimation of the CutoverJob duration. + * + * Generated from protobuf field .google.protobuf.Duration estimated_cutover_job_duration = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Duration|null + */ + public function getEstimatedCutoverJobDuration() + { + return $this->estimated_cutover_job_duration; + } + + public function hasEstimatedCutoverJobDuration() + { + return isset($this->estimated_cutover_job_duration); + } + + public function clearEstimatedCutoverJobDuration() + { + unset($this->estimated_cutover_job_duration); + } + + /** + * Output only. Estimation of the CutoverJob duration. + * + * Generated from protobuf field .google.protobuf.Duration estimated_cutover_job_duration = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setEstimatedCutoverJobDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->estimated_cutover_job_duration = $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..f8930646f96d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob.php @@ -0,0 +1,468 @@ +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\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails $compute_engine_disks_target_details + * Output only. Details of the target Persistent Disks 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. Details of the target Persistent Disks in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDisksTargetDetails compute_engine_disks_target_details = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails|null + */ + public function getComputeEngineDisksTargetDetails() + { + return $this->readOneof(20); + } + + public function hasComputeEngineDisksTargetDetails() + { + return $this->hasOneof(20); + } + + /** + * Output only. Details of the target Persistent Disks in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDisksTargetDetails compute_engine_disks_target_details = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails $var + * @return $this + */ + public function setComputeEngineDisksTargetDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails::class); + $this->writeOneof(20, $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/DataDiskImageImport.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DataDiskImageImport.php new file mode 100644 index 000000000000..dcddf184f0a5 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DataDiskImageImport.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.DataDiskImageImport + */ +class DataDiskImageImport 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/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..46e04e917a45 --- /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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDiskMigrationJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDiskMigrationJobRequest.php new file mode 100644 index 000000000000..e615a8a6ee85 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDiskMigrationJobRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.DeleteDiskMigrationJobRequest + */ +class DeleteDiskMigrationJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the DiskMigrationJob. + * + * 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 DiskMigrationJob. Please see + * {@see VmMigrationClient::diskMigrationJobName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\DeleteDiskMigrationJobRequest + * + * @experimental + */ + public static function build(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 DiskMigrationJob. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the DiskMigrationJob. + * + * Generated from 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 DiskMigrationJob. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @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/DeleteGroupRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteGroupRequest.php new file mode 100644 index 000000000000..60e62e2f1352 --- /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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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/DeleteImageImportRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteImageImportRequest.php new file mode 100644 index 000000000000..1d07aeecebd9 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteImageImportRequest.php @@ -0,0 +1,155 @@ +google.cloud.vmmigration.v1.DeleteImageImportRequest + */ +class DeleteImageImportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ImageImport 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 ImageImport name. Please see + * {@see VmMigrationClient::imageImportName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\DeleteImageImportRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The ImageImport 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 ImageImport 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 ImageImport 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..fecc2f1d3685 --- /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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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..a31415afd16a --- /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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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..4c2b2b73e4c9 --- /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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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/DiskImageTargetDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskImageTargetDetails.php new file mode 100644 index 000000000000..a4b3d8c60019 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskImageTargetDetails.php @@ -0,0 +1,418 @@ +google.cloud.vmmigration.v1.DiskImageTargetDetails + */ +class DiskImageTargetDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the image to be created. + * + * Generated from protobuf field string image_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $image_name = ''; + /** + * Required. Reference to the TargetProject resource that represents the + * target project in which the imported image will be created. + * + * Generated from protobuf field string target_project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $target_project = ''; + /** + * Optional. An optional description of the image. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. The name of the image family to which the new image belongs. + * + * Generated from protobuf field string family_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $family_name = ''; + /** + * Optional. A map of labels to associate with the image. + * + * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Additional licenses to assign to the image. + * Format: + * https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME + * Or + * https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME + * + * Generated from protobuf field repeated string additional_licenses = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $additional_licenses; + /** + * Optional. Set to true to set the image storageLocations to the single + * region of the import job. When false, the closest multi-region is selected. + * + * Generated from protobuf field bool single_region_storage = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $single_region_storage = false; + /** + * Immutable. The encryption to apply to the image. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 10 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $encryption = null; + protected $os_adaptation_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\ImageImportOsAdaptationParameters $os_adaptation_parameters + * Optional. Use to set the parameters relevant for the OS adaptation + * process. + * @type \Google\Cloud\VMMigration\V1\DataDiskImageImport $data_disk_image_import + * Optional. Use to skip OS adaptation process. + * @type string $image_name + * Required. The name of the image to be created. + * @type string $target_project + * Required. Reference to the TargetProject resource that represents the + * target project in which the imported image will be created. + * @type string $description + * Optional. An optional description of the image. + * @type string $family_name + * Optional. The name of the image family to which the new image belongs. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. A map of labels to associate with the image. + * @type array|\Google\Protobuf\Internal\RepeatedField $additional_licenses + * Optional. Additional licenses to assign to the image. + * Format: + * https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME + * Or + * https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME + * @type bool $single_region_storage + * Optional. Set to true to set the image storageLocations to the single + * region of the import job. When false, the closest multi-region is selected. + * @type \Google\Cloud\VMMigration\V1\Encryption $encryption + * Immutable. The encryption to apply to the image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Use to set the parameters relevant for the OS adaptation + * process. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ImageImportOsAdaptationParameters os_adaptation_parameters = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VMMigration\V1\ImageImportOsAdaptationParameters|null + */ + public function getOsAdaptationParameters() + { + return $this->readOneof(11); + } + + public function hasOsAdaptationParameters() + { + return $this->hasOneof(11); + } + + /** + * Optional. Use to set the parameters relevant for the OS adaptation + * process. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ImageImportOsAdaptationParameters os_adaptation_parameters = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VMMigration\V1\ImageImportOsAdaptationParameters $var + * @return $this + */ + public function setOsAdaptationParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ImageImportOsAdaptationParameters::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Optional. Use to skip OS adaptation process. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DataDiskImageImport data_disk_image_import = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VMMigration\V1\DataDiskImageImport|null + */ + public function getDataDiskImageImport() + { + return $this->readOneof(12); + } + + public function hasDataDiskImageImport() + { + return $this->hasOneof(12); + } + + /** + * Optional. Use to skip OS adaptation process. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DataDiskImageImport data_disk_image_import = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VMMigration\V1\DataDiskImageImport $var + * @return $this + */ + public function setDataDiskImageImport($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\DataDiskImageImport::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Required. The name of the image to be created. + * + * Generated from protobuf field string image_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getImageName() + { + return $this->image_name; + } + + /** + * Required. The name of the image to be created. + * + * Generated from protobuf field string image_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setImageName($var) + { + GPBUtil::checkString($var, True); + $this->image_name = $var; + + return $this; + } + + /** + * Required. Reference to the TargetProject resource that represents the + * target project in which the imported image will be created. + * + * Generated from protobuf field string target_project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getTargetProject() + { + return $this->target_project; + } + + /** + * Required. Reference to the TargetProject resource that represents the + * target project in which the imported image will be created. + * + * Generated from protobuf field string target_project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTargetProject($var) + { + GPBUtil::checkString($var, True); + $this->target_project = $var; + + return $this; + } + + /** + * Optional. An optional description of the image. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. An optional description of the image. + * + * Generated from protobuf field string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. The name of the image family to which the new image belongs. + * + * Generated from protobuf field string family_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFamilyName() + { + return $this->family_name; + } + + /** + * Optional. The name of the image family to which the new image belongs. + * + * Generated from protobuf field string family_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFamilyName($var) + { + GPBUtil::checkString($var, True); + $this->family_name = $var; + + return $this; + } + + /** + * Optional. A map of labels to associate with the image. + * + * Generated from protobuf field map labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. A map of labels to associate with the image. + * + * Generated from protobuf field map labels = 7 [(.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. Additional licenses to assign to the image. + * Format: + * https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME + * Or + * https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME + * + * Generated from protobuf field repeated string additional_licenses = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdditionalLicenses() + { + return $this->additional_licenses; + } + + /** + * Optional. Additional licenses to assign to the image. + * Format: + * https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME + * Or + * https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME + * + * Generated from protobuf field repeated string additional_licenses = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @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; + } + + /** + * Optional. Set to true to set the image storageLocations to the single + * region of the import job. When false, the closest multi-region is selected. + * + * Generated from protobuf field bool single_region_storage = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSingleRegionStorage() + { + return $this->single_region_storage; + } + + /** + * Optional. Set to true to set the image storageLocations to the single + * region of the import job. When false, the closest multi-region is selected. + * + * Generated from protobuf field bool single_region_storage = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSingleRegionStorage($var) + { + GPBUtil::checkBool($var); + $this->single_region_storage = $var; + + return $this; + } + + /** + * Immutable. The encryption to apply to the image. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\VMMigration\V1\Encryption|null + */ + public function getEncryption() + { + return $this->encryption; + } + + public function hasEncryption() + { + return isset($this->encryption); + } + + public function clearEncryption() + { + unset($this->encryption); + } + + /** + * Immutable. The encryption to apply to the image. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 10 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\VMMigration\V1\Encryption $var + * @return $this + */ + public function setEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Encryption::class); + $this->encryption = $var; + + return $this; + } + + /** + * @return string + */ + public function getOsAdaptationConfig() + { + return $this->whichOneof("os_adaptation_config"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationJob.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationJob.php new file mode 100644 index 000000000000..cf7234f510e8 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationJob.php @@ -0,0 +1,348 @@ +google.cloud.vmmigration.v1.DiskMigrationJob + */ +class DiskMigrationJob extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Identifier. The identifier of the DiskMigrationJob. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Required. Details of the target Disk in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DiskMigrationJobTargetDetails target_details = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $target_details = null; + /** + * Output only. The time the DiskMigrationJob resource 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 DiskMigrationJob resource was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. State of the DiskMigrationJob. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DiskMigrationJob.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Provides details on the errors that led to the disk migration + * job's state in case of an error. + * + * Generated from protobuf field repeated .google.rpc.Status errors = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $errors; + /** + * Output only. The disk migration steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.DiskMigrationStep steps = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $steps; + protected $source_disk_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\AwsSourceDiskDetails $aws_source_disk_details + * Details of the unattached AWS source disk. + * @type string $name + * Output only. Identifier. The identifier of the DiskMigrationJob. + * @type \Google\Cloud\VMMigration\V1\DiskMigrationJobTargetDetails $target_details + * Required. Details of the target Disk in Compute Engine. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the DiskMigrationJob resource was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last time the DiskMigrationJob resource was updated. + * @type int $state + * Output only. State of the DiskMigrationJob. + * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $errors + * Output only. Provides details on the errors that led to the disk migration + * job's state in case of an error. + * @type array<\Google\Cloud\VMMigration\V1\DiskMigrationStep>|\Google\Protobuf\Internal\RepeatedField $steps + * Output only. The disk migration steps list representing its progress. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Details of the unattached AWS source disk. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDiskDetails aws_source_disk_details = 2; + * @return \Google\Cloud\VMMigration\V1\AwsSourceDiskDetails|null + */ + public function getAwsSourceDiskDetails() + { + return $this->readOneof(2); + } + + public function hasAwsSourceDiskDetails() + { + return $this->hasOneof(2); + } + + /** + * Details of the unattached AWS source disk. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDiskDetails aws_source_disk_details = 2; + * @param \Google\Cloud\VMMigration\V1\AwsSourceDiskDetails $var + * @return $this + */ + public function setAwsSourceDiskDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AwsSourceDiskDetails::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Output only. Identifier. The identifier of the DiskMigrationJob. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Identifier. The identifier of the DiskMigrationJob. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.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. Details of the target Disk in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DiskMigrationJobTargetDetails target_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\DiskMigrationJobTargetDetails|null + */ + public function getTargetDetails() + { + return $this->target_details; + } + + public function hasTargetDetails() + { + return isset($this->target_details); + } + + public function clearTargetDetails() + { + unset($this->target_details); + } + + /** + * Required. Details of the target Disk in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DiskMigrationJobTargetDetails target_details = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\DiskMigrationJobTargetDetails $var + * @return $this + */ + public function setTargetDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\DiskMigrationJobTargetDetails::class); + $this->target_details = $var; + + return $this; + } + + /** + * Output only. The time the DiskMigrationJob resource 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 the DiskMigrationJob resource 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 DiskMigrationJob 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 DiskMigrationJob 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; + } + + /** + * Output only. State of the DiskMigrationJob. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DiskMigrationJob.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the DiskMigrationJob. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DiskMigrationJob.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\DiskMigrationJob\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Provides details on the errors that led to the disk migration + * job's state in case of an error. + * + * Generated from protobuf field repeated .google.rpc.Status errors = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * Output only. Provides details on the errors that led to the disk migration + * job's state in case of an error. + * + * Generated from protobuf field repeated .google.rpc.Status errors = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->errors = $arr; + + return $this; + } + + /** + * Output only. The disk migration steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.DiskMigrationStep steps = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSteps() + { + return $this->steps; + } + + /** + * Output only. The disk migration steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.DiskMigrationStep steps = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\DiskMigrationStep>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSteps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\DiskMigrationStep::class); + $this->steps = $arr; + + return $this; + } + + /** + * @return string + */ + public function getSourceDiskDetails() + { + return $this->whichOneof("source_disk_details"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationJob/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationJob/State.php new file mode 100644 index 000000000000..dd41695d150a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationJob/State.php @@ -0,0 +1,93 @@ +google.cloud.vmmigration.v1.DiskMigrationJob.State + */ +class State +{ + /** + * The state is unspecified. This is not in use. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The initial state of the disk migration. + * In this state the customers can update the target details. + * + * Generated from protobuf enum READY = 1; + */ + const READY = 1; + /** + * The migration is active, and it's running or scheduled to run. + * + * Generated from protobuf enum RUNNING = 3; + */ + const RUNNING = 3; + /** + * The migration completed successfully. + * + * Generated from protobuf enum SUCCEEDED = 4; + */ + const SUCCEEDED = 4; + /** + * Migration cancellation was initiated. + * + * Generated from protobuf enum CANCELLING = 5; + */ + const CANCELLING = 5; + /** + * The migration was cancelled. + * + * Generated from protobuf enum CANCELLED = 6; + */ + const CANCELLED = 6; + /** + * The migration process encountered an unrecoverable error and was aborted. + * + * Generated from protobuf enum FAILED = 7; + */ + const FAILED = 7; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::READY => 'READY', + self::RUNNING => 'RUNNING', + self::SUCCEEDED => 'SUCCEEDED', + self::CANCELLING => 'CANCELLING', + self::CANCELLED => 'CANCELLED', + 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\DiskMigrationJob_State::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationJobTargetDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationJobTargetDetails.php new file mode 100644 index 000000000000..bf302bd40148 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationJobTargetDetails.php @@ -0,0 +1,203 @@ +google.cloud.vmmigration.v1.DiskMigrationJobTargetDetails + */ +class DiskMigrationJobTargetDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the resource of type TargetProject which represents + * the Compute Engine project in which to create the disk. Should be of the + * form: projects/{project}/locations/global/targetProjects/{target-project} + * + * Generated from protobuf field string target_project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $target_project = ''; + /** + * Optional. A map of labels to associate with the disk. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. The encryption to apply to the disk. + * If the DiskMigrationJob parent Source resource has an encryption, this + * field must be set to the same encryption key. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encryption = null; + protected $target_storage; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\ComputeEngineDisk $target_disk + * Required. The target disk. + * @type string $target_project + * Required. The name of the resource of type TargetProject which represents + * the Compute Engine project in which to create the disk. Should be of the + * form: projects/{project}/locations/global/targetProjects/{target-project} + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. A map of labels to associate with the disk. + * @type \Google\Cloud\VMMigration\V1\Encryption $encryption + * Optional. The encryption to apply to the disk. + * If the DiskMigrationJob parent Source resource has an encryption, this + * field must be set to the same encryption key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The target disk. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDisk target_disk = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\ComputeEngineDisk|null + */ + public function getTargetDisk() + { + return $this->readOneof(8); + } + + public function hasTargetDisk() + { + return $this->hasOneof(8); + } + + /** + * Required. The target disk. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDisk target_disk = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\ComputeEngineDisk $var + * @return $this + */ + public function setTargetDisk($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineDisk::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Required. The name of the resource of type TargetProject which represents + * the Compute Engine project in which to create the disk. Should be of the + * form: projects/{project}/locations/global/targetProjects/{target-project} + * + * Generated from protobuf field string target_project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getTargetProject() + { + return $this->target_project; + } + + /** + * Required. The name of the resource of type TargetProject which represents + * the Compute Engine project in which to create the disk. Should be of the + * form: projects/{project}/locations/global/targetProjects/{target-project} + * + * Generated from protobuf field string target_project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTargetProject($var) + { + GPBUtil::checkString($var, True); + $this->target_project = $var; + + return $this; + } + + /** + * Optional. A map of labels to associate with the disk. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. A map of labels to associate with the disk. + * + * 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; + } + + /** + * Optional. The encryption to apply to the disk. + * If the DiskMigrationJob parent Source resource has an encryption, this + * field must be set to the same encryption key. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VMMigration\V1\Encryption|null + */ + public function getEncryption() + { + return $this->encryption; + } + + public function hasEncryption() + { + return isset($this->encryption); + } + + public function clearEncryption() + { + unset($this->encryption); + } + + /** + * Optional. The encryption to apply to the disk. + * If the DiskMigrationJob parent Source resource has an encryption, this + * field must be set to the same encryption key. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VMMigration\V1\Encryption $var + * @return $this + */ + public function setEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Encryption::class); + $this->encryption = $var; + + return $this; + } + + /** + * @return string + */ + public function getTargetStorage() + { + return $this->whichOneof("target_storage"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationStep.php new file mode 100644 index 000000000000..bb2a8174f9ad --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationStep.php @@ -0,0 +1,229 @@ +google.cloud.vmmigration.v1.DiskMigrationStep + */ +class DiskMigrationStep extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the step has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. The time the step has ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + protected $step; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\CreatingSourceDiskSnapshotStep $creating_source_disk_snapshot + * Creating source disk snapshot step. + * @type \Google\Cloud\VMMigration\V1\CopyingSourceDiskSnapshotStep $copying_source_disk_snapshot + * Copying source disk snapshot step. + * @type \Google\Cloud\VMMigration\V1\ProvisioningTargetDiskStep $provisioning_target_disk + * Creating target disk step. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. The time the step has started. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the step has ended. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Creating source disk snapshot step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CreatingSourceDiskSnapshotStep creating_source_disk_snapshot = 3; + * @return \Google\Cloud\VMMigration\V1\CreatingSourceDiskSnapshotStep|null + */ + public function getCreatingSourceDiskSnapshot() + { + return $this->readOneof(3); + } + + public function hasCreatingSourceDiskSnapshot() + { + return $this->hasOneof(3); + } + + /** + * Creating source disk snapshot step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CreatingSourceDiskSnapshotStep creating_source_disk_snapshot = 3; + * @param \Google\Cloud\VMMigration\V1\CreatingSourceDiskSnapshotStep $var + * @return $this + */ + public function setCreatingSourceDiskSnapshot($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\CreatingSourceDiskSnapshotStep::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Copying source disk snapshot step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CopyingSourceDiskSnapshotStep copying_source_disk_snapshot = 4; + * @return \Google\Cloud\VMMigration\V1\CopyingSourceDiskSnapshotStep|null + */ + public function getCopyingSourceDiskSnapshot() + { + return $this->readOneof(4); + } + + public function hasCopyingSourceDiskSnapshot() + { + return $this->hasOneof(4); + } + + /** + * Copying source disk snapshot step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CopyingSourceDiskSnapshotStep copying_source_disk_snapshot = 4; + * @param \Google\Cloud\VMMigration\V1\CopyingSourceDiskSnapshotStep $var + * @return $this + */ + public function setCopyingSourceDiskSnapshot($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\CopyingSourceDiskSnapshotStep::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Creating target disk step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ProvisioningTargetDiskStep provisioning_target_disk = 5; + * @return \Google\Cloud\VMMigration\V1\ProvisioningTargetDiskStep|null + */ + public function getProvisioningTargetDisk() + { + return $this->readOneof(5); + } + + public function hasProvisioningTargetDisk() + { + return $this->hasOneof(5); + } + + /** + * Creating target disk step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ProvisioningTargetDiskStep provisioning_target_disk = 5; + * @param \Google\Cloud\VMMigration\V1\ProvisioningTargetDiskStep $var + * @return $this + */ + public function setProvisioningTargetDisk($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ProvisioningTargetDiskStep::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Output only. The time the step has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.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 step has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.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 step has ended. + * + * 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 step has ended. + * + * 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; + } + + /** + * @return string + */ + public function getStep() + { + return $this->whichOneof("step"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationDisksTargetDefaults.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationDisksTargetDefaults.php new file mode 100644 index 000000000000..ab03b8c4d8b1 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationDisksTargetDefaults.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.DisksMigrationDisksTargetDefaults + */ +class DisksMigrationDisksTargetDefaults 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/DisksMigrationDisksTargetDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationDisksTargetDetails.php new file mode 100644 index 000000000000..a8bc9f589b43 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationDisksTargetDetails.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.DisksMigrationDisksTargetDetails + */ +class DisksMigrationDisksTargetDetails 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/DisksMigrationVmTargetDefaults.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationVmTargetDefaults.php new file mode 100644 index 000000000000..125c5d005c8f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationVmTargetDefaults.php @@ -0,0 +1,619 @@ +google.cloud.vmmigration.v1.DisksMigrationVmTargetDefaults + */ +class DisksMigrationVmTargetDefaults extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the VM to create. + * + * Generated from protobuf field string vm_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $vm_name = ''; + /** + * Optional. The machine type series to create the VM with. + * For presentation only. + * + * Generated from protobuf field string machine_type_series = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $machine_type_series = ''; + /** + * Required. The machine type to create the VM with. + * + * Generated from protobuf field string machine_type = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $machine_type = ''; + /** + * Optional. A list of network tags to associate with the VM. + * + * Generated from protobuf field repeated string network_tags = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $network_tags; + /** + * Optional. NICs to attach to the VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $network_interfaces; + /** + * Optional. The service account to associate the VM with. + * + * Generated from protobuf field string service_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_account = ''; + /** + * Optional. Compute instance scheduling information (if empty default is + * used). + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $compute_scheduling = null; + /** + * Optional. 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 = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $secure_boot = false; + /** + * Optional. Defines whether the instance has vTPM enabled. + * + * Generated from protobuf field bool enable_vtpm = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_vtpm = false; + /** + * Optional. Defines whether the instance has integrity monitoring enabled. + * + * Generated from protobuf field bool enable_integrity_monitoring = 17 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_integrity_monitoring = false; + /** + * Optional. The metadata key/value pairs to assign to the VM. + * + * Generated from protobuf field map metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $metadata; + /** + * Optional. Additional licenses to assign to the VM. + * + * Generated from protobuf field repeated string additional_licenses = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $additional_licenses; + /** + * Optional. The hostname to assign to the VM. + * + * Generated from protobuf field string hostname = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $hostname = ''; + /** + * Optional. A map of labels to associate with the VM. + * + * Generated from protobuf field map labels = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Details of the boot disk of the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.BootDiskDefaults boot_disk_defaults = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $boot_disk_defaults = null; + /** + * Optional. The encryption to apply to the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encryption = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $vm_name + * Required. The name of the VM to create. + * @type string $machine_type_series + * Optional. The machine type series to create the VM with. + * For presentation only. + * @type string $machine_type + * Required. The machine type to create the VM with. + * @type array|\Google\Protobuf\Internal\RepeatedField $network_tags + * Optional. A list of network tags to associate with the VM. + * @type array<\Google\Cloud\VMMigration\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interfaces + * Optional. NICs to attach to the VM. + * @type string $service_account + * Optional. The service account to associate the VM with. + * @type \Google\Cloud\VMMigration\V1\ComputeScheduling $compute_scheduling + * Optional. Compute instance scheduling information (if empty default is + * used). + * @type bool $secure_boot + * Optional. Defines whether the instance has Secure Boot enabled. + * This can be set to true only if the VM boot option is EFI. + * @type bool $enable_vtpm + * Optional. Defines whether the instance has vTPM enabled. + * @type bool $enable_integrity_monitoring + * Optional. Defines whether the instance has integrity monitoring enabled. + * @type array|\Google\Protobuf\Internal\MapField $metadata + * Optional. The metadata key/value pairs to assign to the VM. + * @type array|\Google\Protobuf\Internal\RepeatedField $additional_licenses + * Optional. Additional licenses to assign to the VM. + * @type string $hostname + * Optional. The hostname to assign to the VM. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. A map of labels to associate with the VM. + * @type \Google\Cloud\VMMigration\V1\BootDiskDefaults $boot_disk_defaults + * Optional. Details of the boot disk of the VM. + * @type \Google\Cloud\VMMigration\V1\Encryption $encryption + * Optional. The encryption to apply to the VM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the VM to create. + * + * Generated from protobuf field string vm_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getVmName() + { + return $this->vm_name; + } + + /** + * Required. The name of the VM to create. + * + * Generated from protobuf field string vm_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setVmName($var) + { + GPBUtil::checkString($var, True); + $this->vm_name = $var; + + return $this; + } + + /** + * Optional. The machine type series to create the VM with. + * For presentation only. + * + * Generated from protobuf field string machine_type_series = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMachineTypeSeries() + { + return $this->machine_type_series; + } + + /** + * Optional. The machine type series to create the VM with. + * For presentation only. + * + * Generated from protobuf field string machine_type_series = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMachineTypeSeries($var) + { + GPBUtil::checkString($var, True); + $this->machine_type_series = $var; + + return $this; + } + + /** + * Required. The machine type to create the VM with. + * + * Generated from protobuf field string machine_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * Required. The machine type to create the VM with. + * + * Generated from protobuf field string machine_type = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * Optional. A list of network tags to associate with the VM. + * + * Generated from protobuf field repeated string network_tags = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkTags() + { + return $this->network_tags; + } + + /** + * Optional. A list of network tags to associate with the VM. + * + * Generated from protobuf field repeated string network_tags = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @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; + } + + /** + * Optional. NICs to attach to the VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkInterfaces() + { + return $this->network_interfaces; + } + + /** + * Optional. NICs to attach to the VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @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; + } + + /** + * Optional. The service account to associate the VM with. + * + * Generated from protobuf field string service_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getServiceAccount() + { + return $this->service_account; + } + + /** + * Optional. The service account to associate the VM with. + * + * Generated from protobuf field string service_account = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkString($var, True); + $this->service_account = $var; + + return $this; + } + + /** + * Optional. Compute instance scheduling information (if empty default is + * used). + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Compute instance scheduling information (if empty default is + * used). + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeScheduling compute_scheduling = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @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; + } + + /** + * Optional. 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 = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSecureBoot() + { + return $this->secure_boot; + } + + /** + * Optional. 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 = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSecureBoot($var) + { + GPBUtil::checkBool($var); + $this->secure_boot = $var; + + return $this; + } + + /** + * Optional. Defines whether the instance has vTPM enabled. + * + * Generated from protobuf field bool enable_vtpm = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableVtpm() + { + return $this->enable_vtpm; + } + + /** + * Optional. Defines whether the instance has vTPM enabled. + * + * Generated from protobuf field bool enable_vtpm = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableVtpm($var) + { + GPBUtil::checkBool($var); + $this->enable_vtpm = $var; + + return $this; + } + + /** + * Optional. Defines whether the instance has integrity monitoring enabled. + * + * Generated from protobuf field bool enable_integrity_monitoring = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableIntegrityMonitoring() + { + return $this->enable_integrity_monitoring; + } + + /** + * Optional. Defines whether the instance has integrity monitoring enabled. + * + * Generated from protobuf field bool enable_integrity_monitoring = 17 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableIntegrityMonitoring($var) + { + GPBUtil::checkBool($var); + $this->enable_integrity_monitoring = $var; + + return $this; + } + + /** + * Optional. The metadata key/value pairs to assign to the VM. + * + * Generated from protobuf field map metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getMetadata() + { + return $this->metadata; + } + + /** + * Optional. The metadata key/value pairs to assign to the VM. + * + * Generated from protobuf field map metadata = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @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; + } + + /** + * Optional. Additional licenses to assign to the VM. + * + * Generated from protobuf field repeated string additional_licenses = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdditionalLicenses() + { + return $this->additional_licenses; + } + + /** + * Optional. Additional licenses to assign to the VM. + * + * Generated from protobuf field repeated string additional_licenses = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @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; + } + + /** + * Optional. The hostname to assign to the VM. + * + * Generated from protobuf field string hostname = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getHostname() + { + return $this->hostname; + } + + /** + * Optional. The hostname to assign to the VM. + * + * Generated from protobuf field string hostname = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setHostname($var) + { + GPBUtil::checkString($var, True); + $this->hostname = $var; + + return $this; + } + + /** + * Optional. A map of labels to associate with the VM. + * + * Generated from protobuf field map labels = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. A map of labels to associate with the VM. + * + * Generated from protobuf field map labels = 13 [(.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. Details of the boot disk of the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.BootDiskDefaults boot_disk_defaults = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VMMigration\V1\BootDiskDefaults|null + */ + public function getBootDiskDefaults() + { + return $this->boot_disk_defaults; + } + + public function hasBootDiskDefaults() + { + return isset($this->boot_disk_defaults); + } + + public function clearBootDiskDefaults() + { + unset($this->boot_disk_defaults); + } + + /** + * Optional. Details of the boot disk of the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.BootDiskDefaults boot_disk_defaults = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VMMigration\V1\BootDiskDefaults $var + * @return $this + */ + public function setBootDiskDefaults($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\BootDiskDefaults::class); + $this->boot_disk_defaults = $var; + + return $this; + } + + /** + * Optional. The encryption to apply to the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VMMigration\V1\Encryption|null + */ + public function getEncryption() + { + return $this->encryption; + } + + public function hasEncryption() + { + return isset($this->encryption); + } + + public function clearEncryption() + { + unset($this->encryption); + } + + /** + * Optional. The encryption to apply to the VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VMMigration\V1\Encryption $var + * @return $this + */ + public function setEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Encryption::class); + $this->encryption = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationVmTargetDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationVmTargetDetails.php new file mode 100644 index 000000000000..8cfe966ba6fd --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationVmTargetDetails.php @@ -0,0 +1,67 @@ +google.cloud.vmmigration.v1.DisksMigrationVmTargetDetails + */ +class DisksMigrationVmTargetDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The URI of the Compute Engine VM. + * + * Generated from protobuf field string vm_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $vm_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $vm_uri + * Output only. The URI of the Compute Engine VM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The URI of the Compute Engine VM. + * + * Generated from protobuf field string vm_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVmUri() + { + return $this->vm_uri; + } + + /** + * Output only. The URI of the Compute Engine VM. + * + * Generated from protobuf field string vm_uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVmUri($var) + { + GPBUtil::checkString($var, True); + $this->vm_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Encryption.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Encryption.php new file mode 100644 index 000000000000..54c74f1ba10f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Encryption.php @@ -0,0 +1,71 @@ +google.cloud.vmmigration.v1.Encryption + */ +class Encryption extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the encryption key that is stored in Google Cloud + * KMS. + * + * Generated from protobuf field string kms_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $kms_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kms_key + * Required. The name of the encryption key that is stored in Google Cloud + * KMS. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the encryption key that is stored in Google Cloud + * KMS. + * + * Generated from protobuf field string kms_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getKmsKey() + { + return $this->kms_key; + } + + /** + * Required. The name of the encryption key that is stored in Google Cloud + * KMS. + * + * Generated from protobuf field string kms_key = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setKmsKey($var) + { + GPBUtil::checkString($var, True); + $this->kms_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ExtendMigrationRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ExtendMigrationRequest.php new file mode 100644 index 000000000000..5e9215ea8340 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ExtendMigrationRequest.php @@ -0,0 +1,67 @@ +google.cloud.vmmigration.v1.ExtendMigrationRequest + */ +class ExtendMigrationRequest 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/ExtendMigrationResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ExtendMigrationResponse.php new file mode 100644 index 000000000000..b74ad3172fe5 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ExtendMigrationResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.ExtendMigrationResponse + */ +class ExtendMigrationResponse 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/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..5a03c38c69aa --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryResponse.php @@ -0,0 +1,190 @@ +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\Cloud\VMMigration\V1\AzureVmsDetails $azure_vms + * The description of the VMs in a Source of type Azure. + * @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; + } + + /** + * The description of the VMs in a Source of type Azure. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureVmsDetails azure_vms = 5; + * @return \Google\Cloud\VMMigration\V1\AzureVmsDetails|null + */ + public function getAzureVms() + { + return $this->readOneof(5); + } + + public function hasAzureVms() + { + return $this->hasOneof(5); + } + + /** + * The description of the VMs in a Source of type Azure. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureVmsDetails azure_vms = 5; + * @param \Google\Cloud\VMMigration\V1\AzureVmsDetails $var + * @return $this + */ + public function setAzureVms($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AzureVmsDetails::class); + $this->writeOneof(5, $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/FetchStorageInventoryRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchStorageInventoryRequest.php new file mode 100644 index 000000000000..c248b6bd0ddb --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchStorageInventoryRequest.php @@ -0,0 +1,241 @@ +google.cloud.vmmigration.v1.FetchStorageInventoryRequest + */ +class FetchStorageInventoryRequest 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 = ''; + /** + * Required. The type of the storage inventory to fetch. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.FetchStorageInventoryRequest.StorageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Optional. 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 = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force_refresh = false; + /** + * Optional. The maximum number of VMs to return. The service may return + * fewer than this value. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `FetchStorageInventory` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `FetchStorageInventory` must match the call + * that provided the page token. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $source Required. The name of the Source. Please see + * {@see VmMigrationClient::sourceName()} for help formatting this field. + * @param int $type Required. The type of the storage inventory to fetch. + * For allowed values, use constants defined on {@see \Google\Cloud\VMMigration\V1\FetchStorageInventoryRequest\StorageType} + * + * @return \Google\Cloud\VMMigration\V1\FetchStorageInventoryRequest + * + * @experimental + */ + public static function build(string $source, int $type): self + { + return (new self()) + ->setSource($source) + ->setType($type); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $source + * Required. The name of the Source. + * @type int $type + * Required. The type of the storage inventory to fetch. + * @type bool $force_refresh + * Optional. 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. + * @type int $page_size + * Optional. The maximum number of VMs to return. The service may return + * fewer than this value. + * @type string $page_token + * Optional. A page token, received from a previous `FetchStorageInventory` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `FetchStorageInventory` must match the call + * that provided the page token. + * } + */ + 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; + } + + /** + * Required. The type of the storage inventory to fetch. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.FetchStorageInventoryRequest.StorageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The type of the storage inventory to fetch. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.FetchStorageInventoryRequest.StorageType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\FetchStorageInventoryRequest\StorageType::class); + $this->type = $var; + + return $this; + } + + /** + * Optional. 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 = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForceRefresh() + { + return $this->force_refresh; + } + + /** + * Optional. 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 = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForceRefresh($var) + { + GPBUtil::checkBool($var); + $this->force_refresh = $var; + + return $this; + } + + /** + * Optional. The maximum number of VMs to return. The service may return + * fewer than this value. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of VMs to return. The service may return + * fewer than this value. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `FetchStorageInventory` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `FetchStorageInventory` must match the call + * that provided the page token. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `FetchStorageInventory` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `FetchStorageInventory` must match the call + * that provided the page token. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchStorageInventoryRequest/StorageType.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchStorageInventoryRequest/StorageType.php new file mode 100644 index 000000000000..80bb09595a55 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchStorageInventoryRequest/StorageType.php @@ -0,0 +1,64 @@ +google.cloud.vmmigration.v1.FetchStorageInventoryRequest.StorageType + */ +class StorageType +{ + /** + * The type is unspecified. + * + * Generated from protobuf enum STORAGE_TYPE_UNSPECIFIED = 0; + */ + const STORAGE_TYPE_UNSPECIFIED = 0; + /** + * The type is disks. + * + * Generated from protobuf enum DISKS = 1; + */ + const DISKS = 1; + /** + * The type is snapshots. + * + * Generated from protobuf enum SNAPSHOTS = 2; + */ + const SNAPSHOTS = 2; + + private static $valueToName = [ + self::STORAGE_TYPE_UNSPECIFIED => 'STORAGE_TYPE_UNSPECIFIED', + self::DISKS => 'DISKS', + self::SNAPSHOTS => 'SNAPSHOTS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(StorageType::class, \Google\Cloud\VMMigration\V1\FetchStorageInventoryRequest_StorageType::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchStorageInventoryResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchStorageInventoryResponse.php new file mode 100644 index 000000000000..d4ac29fa2692 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchStorageInventoryResponse.php @@ -0,0 +1,154 @@ +google.cloud.vmmigration.v1.FetchStorageInventoryResponse + */ +class FetchStorageInventoryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of storage resources in the source. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.SourceStorageResource resources = 1; + */ + private $resources; + /** + * 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; + /** + * 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 = 3 [(.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\VMMigration\V1\SourceStorageResource>|\Google\Protobuf\Internal\RepeatedField $resources + * The list of storage resources in the source. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp when the source was last queried (if the result + * is from the cache). + * @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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The list of storage resources in the source. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.SourceStorageResource resources = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getResources() + { + return $this->resources; + } + + /** + * The list of storage resources in the source. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.SourceStorageResource resources = 1; + * @param array<\Google\Cloud\VMMigration\V1\SourceStorageResource>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\SourceStorageResource::class); + $this->resources = $arr; + + 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; + } + + /** + * 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 = 3 [(.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 = 3 [(.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/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/GetDiskMigrationJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetDiskMigrationJobRequest.php new file mode 100644 index 000000000000..8e9e08464c55 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetDiskMigrationJobRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.GetDiskMigrationJobRequest + */ +class GetDiskMigrationJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the DiskMigrationJob. + * + * 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 DiskMigrationJob. Please see + * {@see VmMigrationClient::diskMigrationJobName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetDiskMigrationJobRequest + * + * @experimental + */ + public static function build(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 DiskMigrationJob. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the DiskMigrationJob. + * + * Generated from 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 DiskMigrationJob. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @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/GetImageImportJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetImageImportJobRequest.php new file mode 100644 index 000000000000..320c3b4f8ace --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetImageImportJobRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.GetImageImportJobRequest + */ +class GetImageImportJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ImageImportJob name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The ImageImportJob name. Please see + * {@see VmMigrationClient::imageImportJobName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetImageImportJobRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The ImageImportJob name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ImageImportJob 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 ImageImportJob 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/GetImageImportRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetImageImportRequest.php new file mode 100644 index 000000000000..d4553f7a8fe8 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetImageImportRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.GetImageImportRequest + */ +class GetImageImportRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ImageImport name. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The ImageImport name. Please see + * {@see VmMigrationClient::imageImportName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\GetImageImportRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The ImageImport name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ImageImport 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 ImageImport 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..ee1129f87c76 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group.php @@ -0,0 +1,258 @@ +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 = ''; + /** + * Immutable. The target type of this group. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Group.MigrationTargetType migration_target_type = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $migration_target_type = 0; + + /** + * 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. + * @type int $migration_target_type + * Immutable. The target type of this group. + * } + */ + 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; + } + + /** + * Immutable. The target type of this group. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Group.MigrationTargetType migration_target_type = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getMigrationTargetType() + { + return $this->migration_target_type; + } + + /** + * Immutable. The target type of this group. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Group.MigrationTargetType migration_target_type = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setMigrationTargetType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\Group\MigrationTargetType::class); + $this->migration_target_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group/MigrationTargetType.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group/MigrationTargetType.php new file mode 100644 index 000000000000..bf09e87126f6 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group/MigrationTargetType.php @@ -0,0 +1,64 @@ +google.cloud.vmmigration.v1.Group.MigrationTargetType + */ +class MigrationTargetType +{ + /** + * Group type is not specified. This defaults to Compute Engine targets. + * + * Generated from protobuf enum MIGRATION_TARGET_TYPE_UNSPECIFIED = 0; + */ + const MIGRATION_TARGET_TYPE_UNSPECIFIED = 0; + /** + * All MigratingVMs in the group must have Compute Engine targets. + * + * Generated from protobuf enum MIGRATION_TARGET_TYPE_GCE = 1; + */ + const MIGRATION_TARGET_TYPE_GCE = 1; + /** + * All MigratingVMs in the group must have Compute Engine Disks targets. + * + * Generated from protobuf enum MIGRATION_TARGET_TYPE_DISKS = 2; + */ + const MIGRATION_TARGET_TYPE_DISKS = 2; + + private static $valueToName = [ + self::MIGRATION_TARGET_TYPE_UNSPECIFIED => 'MIGRATION_TARGET_TYPE_UNSPECIFIED', + self::MIGRATION_TARGET_TYPE_GCE => 'MIGRATION_TARGET_TYPE_GCE', + self::MIGRATION_TARGET_TYPE_DISKS => 'MIGRATION_TARGET_TYPE_DISKS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MigrationTargetType::class, \Google\Cloud\VMMigration\V1\Group_MigrationTargetType::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImport.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImport.php new file mode 100644 index 000000000000..e4ec7140d676 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImport.php @@ -0,0 +1,323 @@ +google.cloud.vmmigration.v1.ImageImport + */ +class ImageImport extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource path of the ImageImport. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The time the image import was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The result of the most recent runs for this ImageImport. All + * jobs for this ImageImport can be listed via ListImageImportJobs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ImageImportJob recent_image_import_jobs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $recent_image_import_jobs; + /** + * Immutable. The encryption details used by the image import process during + * the image adaptation for Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $encryption = null; + protected $source; + protected $target_defaults; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cloud_storage_uri + * Immutable. The path to the Cloud Storage file from which the image should + * be imported. + * @type \Google\Cloud\VMMigration\V1\DiskImageTargetDetails $disk_image_target_defaults + * Immutable. Target details for importing a disk image, will be used by + * ImageImportJob. + * @type \Google\Cloud\VMMigration\V1\MachineImageTargetDetails $machine_image_target_defaults + * Immutable. Target details for importing a machine image, will be used by + * ImageImportJob. + * @type string $name + * Output only. The resource path of the ImageImport. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the image import was created. + * @type array<\Google\Cloud\VMMigration\V1\ImageImportJob>|\Google\Protobuf\Internal\RepeatedField $recent_image_import_jobs + * Output only. The result of the most recent runs for this ImageImport. All + * jobs for this ImageImport can be listed via ListImageImportJobs. + * @type \Google\Cloud\VMMigration\V1\Encryption $encryption + * Immutable. The encryption details used by the image import process during + * the image adaptation for Compute Engine. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The path to the Cloud Storage file from which the image should + * be imported. + * + * Generated from protobuf field string cloud_storage_uri = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getCloudStorageUri() + { + return $this->readOneof(2); + } + + public function hasCloudStorageUri() + { + return $this->hasOneof(2); + } + + /** + * Immutable. The path to the Cloud Storage file from which the image should + * be imported. + * + * Generated from protobuf field string cloud_storage_uri = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setCloudStorageUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Immutable. Target details for importing a disk image, will be used by + * ImageImportJob. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DiskImageTargetDetails disk_image_target_defaults = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\VMMigration\V1\DiskImageTargetDetails|null + */ + public function getDiskImageTargetDefaults() + { + return $this->readOneof(4); + } + + public function hasDiskImageTargetDefaults() + { + return $this->hasOneof(4); + } + + /** + * Immutable. Target details for importing a disk image, will be used by + * ImageImportJob. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DiskImageTargetDetails disk_image_target_defaults = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\VMMigration\V1\DiskImageTargetDetails $var + * @return $this + */ + public function setDiskImageTargetDefaults($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\DiskImageTargetDetails::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Immutable. Target details for importing a machine image, will be used by + * ImageImportJob. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MachineImageTargetDetails machine_image_target_defaults = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\VMMigration\V1\MachineImageTargetDetails|null + */ + public function getMachineImageTargetDefaults() + { + return $this->readOneof(7); + } + + public function hasMachineImageTargetDefaults() + { + return $this->hasOneof(7); + } + + /** + * Immutable. Target details for importing a machine image, will be used by + * ImageImportJob. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MachineImageTargetDetails machine_image_target_defaults = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\VMMigration\V1\MachineImageTargetDetails $var + * @return $this + */ + public function setMachineImageTargetDefaults($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\MachineImageTargetDetails::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Output only. The resource path of the ImageImport. + * + * 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 path of the ImageImport. + * + * 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 the image import was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the image import was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The result of the most recent runs for this ImageImport. All + * jobs for this ImageImport can be listed via ListImageImportJobs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ImageImportJob recent_image_import_jobs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRecentImageImportJobs() + { + return $this->recent_image_import_jobs; + } + + /** + * Output only. The result of the most recent runs for this ImageImport. All + * jobs for this ImageImport can be listed via ListImageImportJobs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ImageImportJob recent_image_import_jobs = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\ImageImportJob>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRecentImageImportJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\ImageImportJob::class); + $this->recent_image_import_jobs = $arr; + + return $this; + } + + /** + * Immutable. The encryption details used by the image import process during + * the image adaptation for Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\VMMigration\V1\Encryption|null + */ + public function getEncryption() + { + return $this->encryption; + } + + public function hasEncryption() + { + return isset($this->encryption); + } + + public function clearEncryption() + { + unset($this->encryption); + } + + /** + * Immutable. The encryption details used by the image import process during + * the image adaptation for Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\VMMigration\V1\Encryption $var + * @return $this + */ + public function setEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Encryption::class); + $this->encryption = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + + /** + * @return string + */ + public function getTargetDefaults() + { + return $this->whichOneof("target_defaults"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportJob.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportJob.php new file mode 100644 index 000000000000..2b39592673de --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportJob.php @@ -0,0 +1,457 @@ +google.cloud.vmmigration.v1.ImageImportJob + */ +class ImageImportJob extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource path of the ImageImportJob. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The resource paths of the resources created by the image + * import job. + * + * Generated from protobuf field repeated string created_resources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $created_resources; + /** + * Output only. The state of the image import. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ImageImportJob.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time the image import was created (as an API call, not + * when it was actually created in the target). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the image import was ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Provides details on the error that led to the image import + * state in case of an error. + * + * Generated from protobuf field repeated .google.rpc.Status errors = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $errors; + /** + * Output only. Warnings that occurred during the image import. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigrationWarning warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $warnings; + /** + * Output only. The image import steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ImageImportStep steps = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $steps; + protected $source; + protected $target_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cloud_storage_uri + * Output only. The path to the Cloud Storage file from which the image + * should be imported. + * @type \Google\Cloud\VMMigration\V1\DiskImageTargetDetails $disk_image_target_details + * Output only. Target details used to import a disk image. + * @type \Google\Cloud\VMMigration\V1\MachineImageTargetDetails $machine_image_target_details + * Output only. Target details used to import a machine image. + * @type string $name + * Output only. The resource path of the ImageImportJob. + * @type array|\Google\Protobuf\Internal\RepeatedField $created_resources + * Output only. The resource paths of the resources created by the image + * import job. + * @type int $state + * Output only. The state of the image import. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the image import 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 image import was ended. + * @type array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $errors + * Output only. Provides details on the error that led to the image import + * state in case of an error. + * @type array<\Google\Cloud\VMMigration\V1\MigrationWarning>|\Google\Protobuf\Internal\RepeatedField $warnings + * Output only. Warnings that occurred during the image import. + * @type array<\Google\Cloud\VMMigration\V1\ImageImportStep>|\Google\Protobuf\Internal\RepeatedField $steps + * Output only. The image import steps list representing its progress. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The path to the Cloud Storage file from which the image + * should be imported. + * + * Generated from protobuf field string cloud_storage_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getCloudStorageUri() + { + return $this->readOneof(10); + } + + public function hasCloudStorageUri() + { + return $this->hasOneof(10); + } + + /** + * Output only. The path to the Cloud Storage file from which the image + * should be imported. + * + * Generated from protobuf field string cloud_storage_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setCloudStorageUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Output only. Target details used to import a disk image. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DiskImageTargetDetails disk_image_target_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\DiskImageTargetDetails|null + */ + public function getDiskImageTargetDetails() + { + return $this->readOneof(3); + } + + public function hasDiskImageTargetDetails() + { + return $this->hasOneof(3); + } + + /** + * Output only. Target details used to import a disk image. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DiskImageTargetDetails disk_image_target_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\DiskImageTargetDetails $var + * @return $this + */ + public function setDiskImageTargetDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\DiskImageTargetDetails::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Output only. Target details used to import a machine image. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MachineImageTargetDetails machine_image_target_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\MachineImageTargetDetails|null + */ + public function getMachineImageTargetDetails() + { + return $this->readOneof(11); + } + + public function hasMachineImageTargetDetails() + { + return $this->hasOneof(11); + } + + /** + * Output only. Target details used to import a machine image. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MachineImageTargetDetails machine_image_target_details = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\MachineImageTargetDetails $var + * @return $this + */ + public function setMachineImageTargetDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\MachineImageTargetDetails::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Output only. The resource path of the ImageImportJob. + * + * 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 path of the ImageImportJob. + * + * 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 resource paths of the resources created by the image + * import job. + * + * Generated from protobuf field repeated string created_resources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCreatedResources() + { + return $this->created_resources; + } + + /** + * Output only. The resource paths of the resources created by the image + * import job. + * + * Generated from protobuf field repeated string created_resources = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCreatedResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->created_resources = $arr; + + return $this; + } + + /** + * Output only. The state of the image import. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ImageImportJob.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the image import. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ImageImportJob.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\ImageImportJob\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time the image import was created (as an API call, not + * when it was actually created in the target). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the image import was created (as an API call, not + * when it was actually created in the target). + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the image import was ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the image import was ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Provides details on the error that led to the image import + * state in case of an error. + * + * Generated from protobuf field repeated .google.rpc.Status errors = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getErrors() + { + return $this->errors; + } + + /** + * Output only. Provides details on the error that led to the image import + * state in case of an error. + * + * Generated from protobuf field repeated .google.rpc.Status errors = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Rpc\Status>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setErrors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->errors = $arr; + + return $this; + } + + /** + * Output only. Warnings that occurred during the image import. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigrationWarning warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWarnings() + { + return $this->warnings; + } + + /** + * Output only. Warnings that occurred during the image import. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigrationWarning warnings = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\MigrationWarning>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWarnings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\MigrationWarning::class); + $this->warnings = $arr; + + return $this; + } + + /** + * Output only. The image import steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ImageImportStep steps = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSteps() + { + return $this->steps; + } + + /** + * Output only. The image import steps list representing its progress. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ImageImportStep steps = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\ImageImportStep>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSteps($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\ImageImportStep::class); + $this->steps = $arr; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + + /** + * @return string + */ + public function getTargetDetails() + { + return $this->whichOneof("target_details"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportJob/State.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportJob/State.php new file mode 100644 index 000000000000..8d1024602300 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportJob/State.php @@ -0,0 +1,92 @@ +google.cloud.vmmigration.v1.ImageImportJob.State + */ +class State +{ + /** + * The state is unknown. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The image import has not yet started. + * + * Generated from protobuf enum PENDING = 1; + */ + const PENDING = 1; + /** + * The image import is active and running. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The image import has finished successfully. + * + * Generated from protobuf enum SUCCEEDED = 3; + */ + const SUCCEEDED = 3; + /** + * The image import has finished with errors. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + /** + * The image import is being cancelled. + * + * Generated from protobuf enum CANCELLING = 5; + */ + const CANCELLING = 5; + /** + * The image import was cancelled. + * + * Generated from protobuf enum CANCELLED = 6; + */ + const CANCELLED = 6; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PENDING => 'PENDING', + 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\VMMigration\V1\ImageImportJob_State::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportOsAdaptationParameters.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportOsAdaptationParameters.php new file mode 100644 index 000000000000..311fc0506e6e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportOsAdaptationParameters.php @@ -0,0 +1,163 @@ +google.cloud.vmmigration.v1.ImageImportOsAdaptationParameters + */ +class ImageImportOsAdaptationParameters extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Set to true in order to generalize the imported image. + * The generalization process enables co-existence of multiple VMs created + * from the same image. + * For Windows, generalizing the image removes computer-specific information + * such as installed drivers and the computer security identifier (SID). + * + * Generated from protobuf field bool generalize = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $generalize = false; + /** + * Optional. Choose which type of license to apply to the imported image. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $license_type = 0; + /** + * Optional. By default the image will keep its existing boot option. Setting + * this property will trigger an internal process which will convert the + * image from using the existing boot option to another. + * The size of the boot disk might be increased to allow the conversion + * + * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $boot_conversion = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $generalize + * Optional. Set to true in order to generalize the imported image. + * The generalization process enables co-existence of multiple VMs created + * from the same image. + * For Windows, generalizing the image removes computer-specific information + * such as installed drivers and the computer security identifier (SID). + * @type int $license_type + * Optional. Choose which type of license to apply to the imported image. + * @type int $boot_conversion + * Optional. By default the image will keep its existing boot option. Setting + * this property will trigger an internal process which will convert the + * image from using the existing boot option to another. + * The size of the boot disk might be increased to allow the conversion + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Set to true in order to generalize the imported image. + * The generalization process enables co-existence of multiple VMs created + * from the same image. + * For Windows, generalizing the image removes computer-specific information + * such as installed drivers and the computer security identifier (SID). + * + * Generated from protobuf field bool generalize = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getGeneralize() + { + return $this->generalize; + } + + /** + * Optional. Set to true in order to generalize the imported image. + * The generalization process enables co-existence of multiple VMs created + * from the same image. + * For Windows, generalizing the image removes computer-specific information + * such as installed drivers and the computer security identifier (SID). + * + * Generated from protobuf field bool generalize = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setGeneralize($var) + { + GPBUtil::checkBool($var); + $this->generalize = $var; + + return $this; + } + + /** + * Optional. Choose which type of license to apply to the imported image. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getLicenseType() + { + return $this->license_type; + } + + /** + * Optional. Choose which type of license to apply to the imported image. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineLicenseType license_type = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setLicenseType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineLicenseType::class); + $this->license_type = $var; + + return $this; + } + + /** + * Optional. By default the image will keep its existing boot option. Setting + * this property will trigger an internal process which will convert the + * image from using the existing boot option to another. + * The size of the boot disk might be increased to allow the conversion + * + * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getBootConversion() + { + return $this->boot_conversion; + } + + /** + * Optional. By default the image will keep its existing boot option. Setting + * this property will trigger an internal process which will convert the + * image from using the existing boot option to another. + * The size of the boot disk might be increased to allow the conversion + * + * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setBootConversion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\BootConversion::class); + $this->boot_conversion = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportStep.php new file mode 100644 index 000000000000..057657760a95 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportStep.php @@ -0,0 +1,262 @@ +google.cloud.vmmigration.v1.ImageImportStep + */ +class ImageImportStep extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the step has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. The time the step has ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + protected $step; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\InitializingImageImportStep $initializing + * Initializing step. + * @type \Google\Cloud\VMMigration\V1\LoadingImageSourceFilesStep $loading_source_files + * Loading source files step. + * @type \Google\Cloud\VMMigration\V1\AdaptingOSStep $adapting_os + * Adapting OS step. + * @type \Google\Cloud\VMMigration\V1\CreatingImageStep $creating_image + * Creating image step. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. The time the step has started. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the step has ended. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Initializing step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.InitializingImageImportStep initializing = 3; + * @return \Google\Cloud\VMMigration\V1\InitializingImageImportStep|null + */ + public function getInitializing() + { + return $this->readOneof(3); + } + + public function hasInitializing() + { + return $this->hasOneof(3); + } + + /** + * Initializing step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.InitializingImageImportStep initializing = 3; + * @param \Google\Cloud\VMMigration\V1\InitializingImageImportStep $var + * @return $this + */ + public function setInitializing($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\InitializingImageImportStep::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Loading source files step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.LoadingImageSourceFilesStep loading_source_files = 4; + * @return \Google\Cloud\VMMigration\V1\LoadingImageSourceFilesStep|null + */ + public function getLoadingSourceFiles() + { + return $this->readOneof(4); + } + + public function hasLoadingSourceFiles() + { + return $this->hasOneof(4); + } + + /** + * Loading source files step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.LoadingImageSourceFilesStep loading_source_files = 4; + * @param \Google\Cloud\VMMigration\V1\LoadingImageSourceFilesStep $var + * @return $this + */ + public function setLoadingSourceFiles($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\LoadingImageSourceFilesStep::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Adapting OS step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AdaptingOSStep adapting_os = 5; + * @return \Google\Cloud\VMMigration\V1\AdaptingOSStep|null + */ + public function getAdaptingOs() + { + return $this->readOneof(5); + } + + public function hasAdaptingOs() + { + return $this->hasOneof(5); + } + + /** + * Adapting OS step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AdaptingOSStep adapting_os = 5; + * @param \Google\Cloud\VMMigration\V1\AdaptingOSStep $var + * @return $this + */ + public function setAdaptingOs($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AdaptingOSStep::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Creating image step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CreatingImageStep creating_image = 6; + * @return \Google\Cloud\VMMigration\V1\CreatingImageStep|null + */ + public function getCreatingImage() + { + return $this->readOneof(6); + } + + public function hasCreatingImage() + { + return $this->hasOneof(6); + } + + /** + * Creating image step. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CreatingImageStep creating_image = 6; + * @param \Google\Cloud\VMMigration\V1\CreatingImageStep $var + * @return $this + */ + public function setCreatingImage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\CreatingImageStep::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Output only. The time the step has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.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 step has started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1 [(.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 step has ended. + * + * 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 step has ended. + * + * 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; + } + + /** + * @return string + */ + public function getStep() + { + return $this->whichOneof("step"); + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingImageImportStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingImageImportStep.php new file mode 100644 index 000000000000..8dba6ecee126 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingImageImportStep.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.InitializingImageImportStep + */ +class InitializingImageImportStep 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/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/ListDiskMigrationJobsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDiskMigrationJobsRequest.php new file mode 100644 index 000000000000..c91d5361ad94 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDiskMigrationJobsRequest.php @@ -0,0 +1,245 @@ +google.cloud.vmmigration.v1.ListDiskMigrationJobsRequest + */ +class ListDiskMigrationJobsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of DiskMigrationJobs. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of disk migration jobs to return. The service + * may return fewer than this value. If unspecified, at most 500 + * disk migration 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; + /** + * Optional. A page token, received from a previous `ListDiskMigrationJobs` + * call. Provide this to retrieve the subsequent page. + * When paginating, all parameters provided to `ListDiskMigrationJobs` + * except `page_size` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. The filter request (according to AIP-160). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Ordering of the result list. + * + * 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 DiskMigrationJobs. Please see + * {@see VmMigrationClient::sourceName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\ListDiskMigrationJobsRequest + * + * @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 DiskMigrationJobs. + * @type int $page_size + * Optional. The maximum number of disk migration jobs to return. The service + * may return fewer than this value. If unspecified, at most 500 + * disk migration jobs will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * Optional. A page token, received from a previous `ListDiskMigrationJobs` + * call. Provide this to retrieve the subsequent page. + * When paginating, all parameters provided to `ListDiskMigrationJobs` + * except `page_size` must match the call that provided the page token. + * @type string $filter + * Optional. The filter request (according to AIP-160). + * @type string $order_by + * Optional. Ordering of the result list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of DiskMigrationJobs. + * + * Generated from 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 DiskMigrationJobs. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_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 disk migration jobs to return. The service + * may return fewer than this value. If unspecified, at most 500 + * disk migration 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 disk migration jobs to return. The service + * may return fewer than this value. If unspecified, at most 500 + * disk migration 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; + } + + /** + * Optional. A page token, received from a previous `ListDiskMigrationJobs` + * call. Provide this to retrieve the subsequent page. + * When paginating, all parameters provided to `ListDiskMigrationJobs` + * except `page_size` must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListDiskMigrationJobs` + * call. Provide this to retrieve the subsequent page. + * When paginating, all parameters provided to `ListDiskMigrationJobs` + * except `page_size` must match the call that provided the page token. + * + * 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 request (according to AIP-160). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request (according to AIP-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. Ordering of the result list. + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Ordering of the result list. + * + * 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/ListDiskMigrationJobsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDiskMigrationJobsResponse.php new file mode 100644 index 000000000000..6e70d1ee2552 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDiskMigrationJobsResponse.php @@ -0,0 +1,143 @@ +google.cloud.vmmigration.v1.ListDiskMigrationJobsResponse + */ +class ListDiskMigrationJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of the disk migration jobs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.DiskMigrationJob disk_migration_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $disk_migration_jobs; + /** + * Optional. 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, (.google.api.field_behavior) = OPTIONAL]; + */ + 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, (.google.api.resource_reference) = { + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Cloud\VMMigration\V1\DiskMigrationJob>|\Google\Protobuf\Internal\RepeatedField $disk_migration_jobs + * Output only. The list of the disk migration jobs. + * @type string $next_page_token + * Optional. 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 the disk migration jobs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.DiskMigrationJob disk_migration_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDiskMigrationJobs() + { + return $this->disk_migration_jobs; + } + + /** + * Output only. The list of the disk migration jobs. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.DiskMigrationJob disk_migration_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\DiskMigrationJob>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDiskMigrationJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\DiskMigrationJob::class); + $this->disk_migration_jobs = $arr; + + return $this; + } + + /** + * Optional. 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, (.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Optional. 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, (.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; + } + + /** + * Output only. Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @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, (.google.api.resource_reference) = { + * @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/ListImageImportJobsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListImageImportJobsRequest.php new file mode 100644 index 000000000000..305aa2e72036 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListImageImportJobsRequest.php @@ -0,0 +1,253 @@ +google.cloud.vmmigration.v1.ListImageImportJobsRequest + */ +class ListImageImportJobsRequest 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; + /** + * Optional. A page token, received from a previous `ListImageImportJobs` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListImageImportJobs` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. The filter request (according to AIP-160). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. The order by fields for the result (according to AIP-132). + * Currently ordering is only possible by "name" field. + * + * 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::imageImportName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\ListImageImportJobsRequest + * + * @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 + * Optional. A page token, received from a previous `ListImageImportJobs` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListImageImportJobs` + * must match the call that provided the page token. + * @type string $filter + * Optional. The filter request (according to AIP-160). + * @type string $order_by + * Optional. The order by fields for the result (according to AIP-132). + * Currently ordering is only possible by "name" field. + * } + */ + 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; + } + + /** + * Optional. A page token, received from a previous `ListImageImportJobs` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListImageImportJobs` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListImageImportJobs` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListImageImportJobs` + * must match the call that provided the page token. + * + * 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 request (according to AIP-160). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request (according to AIP-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. The order by fields for the result (according to AIP-132). + * Currently ordering is only possible by "name" field. + * + * 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 (according to AIP-132). + * Currently ordering is only possible by "name" field. + * + * 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/ListImageImportJobsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListImageImportJobsResponse.php new file mode 100644 index 000000000000..6afe64103ced --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListImageImportJobsResponse.php @@ -0,0 +1,139 @@ +google.cloud.vmmigration.v1.ListImageImportJobsResponse + */ +class ListImageImportJobsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of target response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ImageImportJob image_import_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $image_import_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\ImageImportJob>|\Google\Protobuf\Internal\RepeatedField $image_import_jobs + * 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.ImageImportJob image_import_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getImageImportJobs() + { + return $this->image_import_jobs; + } + + /** + * Output only. The list of target response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ImageImportJob image_import_jobs = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\ImageImportJob>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setImageImportJobs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\ImageImportJob::class); + $this->image_import_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/ListImageImportsRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListImageImportsRequest.php new file mode 100644 index 000000000000..c7daef679702 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListImageImportsRequest.php @@ -0,0 +1,253 @@ +google.cloud.vmmigration.v1.ListImageImportsRequest + */ +class ListImageImportsRequest 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; + /** + * Optional. A page token, received from a previous `ListImageImports` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListImageImports` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. The filter request (according to AIP-160). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. The order by fields for the result (according to AIP-132). + * Currently ordering is only possible by "name" field. + * + * 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\ListImageImportsRequest + * + * @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 + * Optional. A page token, received from a previous `ListImageImports` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListImageImports` must + * match the call that provided the page token. + * @type string $filter + * Optional. The filter request (according to AIP-160). + * @type string $order_by + * Optional. The order by fields for the result (according to AIP-132). + * Currently ordering is only possible by "name" field. + * } + */ + 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; + } + + /** + * Optional. A page token, received from a previous `ListImageImports` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListImageImports` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListImageImports` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListImageImports` must + * match the call that provided the page token. + * + * 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 request (according to AIP-160). + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter request (according to AIP-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. The order by fields for the result (according to AIP-132). + * Currently ordering is only possible by "name" field. + * + * 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 (according to AIP-132). + * Currently ordering is only possible by "name" field. + * + * 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/ListImageImportsResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListImageImportsResponse.php new file mode 100644 index 000000000000..996495a0eb34 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListImageImportsResponse.php @@ -0,0 +1,139 @@ +google.cloud.vmmigration.v1.ListImageImportsResponse + */ +class ListImageImportsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The list of target response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ImageImport image_imports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $image_imports; + /** + * 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\ImageImport>|\Google\Protobuf\Internal\RepeatedField $image_imports + * 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.ImageImport image_imports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getImageImports() + { + return $this->image_imports; + } + + /** + * Output only. The list of target response. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.ImageImport image_imports = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\ImageImport>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setImageImports($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\ImageImport::class); + $this->image_imports = $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/LoadingImageSourceFilesStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/LoadingImageSourceFilesStep.php new file mode 100644 index 000000000000..2e1966d24e6b --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/LoadingImageSourceFilesStep.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.LoadingImageSourceFilesStep + */ +class LoadingImageSourceFilesStep 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/MachineImageParametersOverrides.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MachineImageParametersOverrides.php new file mode 100644 index 000000000000..3df5deb08b6d --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MachineImageParametersOverrides.php @@ -0,0 +1,84 @@ +google.cloud.vmmigration.v1.MachineImageParametersOverrides + */ +class MachineImageParametersOverrides extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The machine type to create the MachineImage with. + * If empty, the service will choose a relevant machine type based on the + * information from the source image. + * For more information about machine types, please refer to + * https://cloud.google.com/compute/docs/machine-resource. + * + * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $machine_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $machine_type + * Optional. The machine type to create the MachineImage with. + * If empty, the service will choose a relevant machine type based on the + * information from the source image. + * For more information about machine types, please refer to + * https://cloud.google.com/compute/docs/machine-resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The machine type to create the MachineImage with. + * If empty, the service will choose a relevant machine type based on the + * information from the source image. + * For more information about machine types, please refer to + * https://cloud.google.com/compute/docs/machine-resource. + * + * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * Optional. The machine type to create the MachineImage with. + * If empty, the service will choose a relevant machine type based on the + * information from the source image. + * For more information about machine types, please refer to + * https://cloud.google.com/compute/docs/machine-resource. + * + * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MachineImageTargetDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MachineImageTargetDetails.php new file mode 100644 index 000000000000..2f080f8e48db --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MachineImageTargetDetails.php @@ -0,0 +1,612 @@ +google.cloud.vmmigration.v1.MachineImageTargetDetails + */ +class MachineImageTargetDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the machine image to be created. + * + * Generated from protobuf field string machine_image_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $machine_image_name = ''; + /** + * Required. Reference to the TargetProject resource that represents the + * target project in which the imported machine image will be created. + * + * Generated from protobuf field string target_project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $target_project = ''; + /** + * Optional. An optional description of the machine image. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. Set to true to set the machine image storageLocations to the + * single region of the import job. When false, the closest multi-region is + * selected. + * + * Generated from protobuf field bool single_region_storage = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $single_region_storage = false; + /** + * Immutable. The encryption to apply to the machine image. + * If the Image Import resource has an encryption, this field must be set to + * the same encryption key. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $encryption = null; + /** + * Optional. Parameters overriding decisions based on the source machine image + * configurations. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MachineImageParametersOverrides machine_image_parameters_overrides = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $machine_image_parameters_overrides = null; + /** + * Optional. The service account to assign to the instance created by the + * machine image. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ServiceAccount service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_account = null; + /** + * Optional. Additional licenses to assign to the instance created by the + * machine image. Format: + * https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME + * Or + * https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME + * + * Generated from protobuf field repeated string additional_licenses = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $additional_licenses; + /** + * Optional. The labels to apply to the instance created by the machine image. + * + * Generated from protobuf field map labels = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. The tags to apply to the instance created by the machine image. + * + * Generated from protobuf field repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $tags; + /** + * Optional. Shielded instance configuration. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ShieldedInstanceConfig shielded_instance_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $shielded_instance_config = null; + /** + * Optional. The network interfaces to create with the instance created by the + * machine image. Internal and external IP addresses, and network tiers are + * ignored for machine image import. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $network_interfaces; + protected $os_adaptation_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\ImageImportOsAdaptationParameters $os_adaptation_parameters + * Optional. Use to set the parameters relevant for the OS adaptation + * process. + * @type \Google\Cloud\VMMigration\V1\SkipOsAdaptation $skip_os_adaptation + * Optional. Use to skip OS adaptation process. + * @type string $machine_image_name + * Required. The name of the machine image to be created. + * @type string $target_project + * Required. Reference to the TargetProject resource that represents the + * target project in which the imported machine image will be created. + * @type string $description + * Optional. An optional description of the machine image. + * @type bool $single_region_storage + * Optional. Set to true to set the machine image storageLocations to the + * single region of the import job. When false, the closest multi-region is + * selected. + * @type \Google\Cloud\VMMigration\V1\Encryption $encryption + * Immutable. The encryption to apply to the machine image. + * If the Image Import resource has an encryption, this field must be set to + * the same encryption key. + * @type \Google\Cloud\VMMigration\V1\MachineImageParametersOverrides $machine_image_parameters_overrides + * Optional. Parameters overriding decisions based on the source machine image + * configurations. + * @type \Google\Cloud\VMMigration\V1\ServiceAccount $service_account + * Optional. The service account to assign to the instance created by the + * machine image. + * @type array|\Google\Protobuf\Internal\RepeatedField $additional_licenses + * Optional. Additional licenses to assign to the instance created by the + * machine image. Format: + * https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME + * Or + * https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels to apply to the instance created by the machine image. + * @type array|\Google\Protobuf\Internal\RepeatedField $tags + * Optional. The tags to apply to the instance created by the machine image. + * @type \Google\Cloud\VMMigration\V1\ShieldedInstanceConfig $shielded_instance_config + * Optional. Shielded instance configuration. + * @type array<\Google\Cloud\VMMigration\V1\NetworkInterface>|\Google\Protobuf\Internal\RepeatedField $network_interfaces + * Optional. The network interfaces to create with the instance created by the + * machine image. Internal and external IP addresses, and network tiers are + * ignored for machine image import. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Use to set the parameters relevant for the OS adaptation + * process. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ImageImportOsAdaptationParameters os_adaptation_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VMMigration\V1\ImageImportOsAdaptationParameters|null + */ + public function getOsAdaptationParameters() + { + return $this->readOneof(3); + } + + public function hasOsAdaptationParameters() + { + return $this->hasOneof(3); + } + + /** + * Optional. Use to set the parameters relevant for the OS adaptation + * process. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ImageImportOsAdaptationParameters os_adaptation_parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VMMigration\V1\ImageImportOsAdaptationParameters $var + * @return $this + */ + public function setOsAdaptationParameters($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ImageImportOsAdaptationParameters::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. Use to skip OS adaptation process. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.SkipOsAdaptation skip_os_adaptation = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VMMigration\V1\SkipOsAdaptation|null + */ + public function getSkipOsAdaptation() + { + return $this->readOneof(16); + } + + public function hasSkipOsAdaptation() + { + return $this->hasOneof(16); + } + + /** + * Optional. Use to skip OS adaptation process. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.SkipOsAdaptation skip_os_adaptation = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VMMigration\V1\SkipOsAdaptation $var + * @return $this + */ + public function setSkipOsAdaptation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\SkipOsAdaptation::class); + $this->writeOneof(16, $var); + + return $this; + } + + /** + * Required. The name of the machine image to be created. + * + * Generated from protobuf field string machine_image_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMachineImageName() + { + return $this->machine_image_name; + } + + /** + * Required. The name of the machine image to be created. + * + * Generated from protobuf field string machine_image_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMachineImageName($var) + { + GPBUtil::checkString($var, True); + $this->machine_image_name = $var; + + return $this; + } + + /** + * Required. Reference to the TargetProject resource that represents the + * target project in which the imported machine image will be created. + * + * Generated from protobuf field string target_project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getTargetProject() + { + return $this->target_project; + } + + /** + * Required. Reference to the TargetProject resource that represents the + * target project in which the imported machine image will be created. + * + * Generated from protobuf field string target_project = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setTargetProject($var) + { + GPBUtil::checkString($var, True); + $this->target_project = $var; + + return $this; + } + + /** + * Optional. An optional description of the machine image. + * + * Generated from protobuf field string description = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. An optional description of the machine image. + * + * 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; + } + + /** + * Optional. Set to true to set the machine image storageLocations to the + * single region of the import job. When false, the closest multi-region is + * selected. + * + * Generated from protobuf field bool single_region_storage = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSingleRegionStorage() + { + return $this->single_region_storage; + } + + /** + * Optional. Set to true to set the machine image storageLocations to the + * single region of the import job. When false, the closest multi-region is + * selected. + * + * Generated from protobuf field bool single_region_storage = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSingleRegionStorage($var) + { + GPBUtil::checkBool($var); + $this->single_region_storage = $var; + + return $this; + } + + /** + * Immutable. The encryption to apply to the machine image. + * If the Image Import resource has an encryption, this field must be set to + * the same encryption key. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\VMMigration\V1\Encryption|null + */ + public function getEncryption() + { + return $this->encryption; + } + + public function hasEncryption() + { + return isset($this->encryption); + } + + public function clearEncryption() + { + unset($this->encryption); + } + + /** + * Immutable. The encryption to apply to the machine image. + * If the Image Import resource has an encryption, this field must be set to + * the same encryption key. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\VMMigration\V1\Encryption $var + * @return $this + */ + public function setEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Encryption::class); + $this->encryption = $var; + + return $this; + } + + /** + * Optional. Parameters overriding decisions based on the source machine image + * configurations. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MachineImageParametersOverrides machine_image_parameters_overrides = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VMMigration\V1\MachineImageParametersOverrides|null + */ + public function getMachineImageParametersOverrides() + { + return $this->machine_image_parameters_overrides; + } + + public function hasMachineImageParametersOverrides() + { + return isset($this->machine_image_parameters_overrides); + } + + public function clearMachineImageParametersOverrides() + { + unset($this->machine_image_parameters_overrides); + } + + /** + * Optional. Parameters overriding decisions based on the source machine image + * configurations. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MachineImageParametersOverrides machine_image_parameters_overrides = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VMMigration\V1\MachineImageParametersOverrides $var + * @return $this + */ + public function setMachineImageParametersOverrides($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\MachineImageParametersOverrides::class); + $this->machine_image_parameters_overrides = $var; + + return $this; + } + + /** + * Optional. The service account to assign to the instance created by the + * machine image. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ServiceAccount service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VMMigration\V1\ServiceAccount|null + */ + public function getServiceAccount() + { + return $this->service_account; + } + + public function hasServiceAccount() + { + return isset($this->service_account); + } + + public function clearServiceAccount() + { + unset($this->service_account); + } + + /** + * Optional. The service account to assign to the instance created by the + * machine image. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ServiceAccount service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VMMigration\V1\ServiceAccount $var + * @return $this + */ + public function setServiceAccount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ServiceAccount::class); + $this->service_account = $var; + + return $this; + } + + /** + * Optional. Additional licenses to assign to the instance created by the + * machine image. Format: + * https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME + * Or + * https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME + * + * Generated from protobuf field repeated string additional_licenses = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAdditionalLicenses() + { + return $this->additional_licenses; + } + + /** + * Optional. Additional licenses to assign to the instance created by the + * machine image. Format: + * https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/licenses/LICENSE_NAME + * Or + * https://www.googleapis.com/compute/beta/projects/PROJECT_ID/global/licenses/LICENSE_NAME + * + * Generated from protobuf field repeated string additional_licenses = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @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; + } + + /** + * Optional. The labels to apply to the instance created by the machine image. + * + * 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 to apply to the instance created by the machine image. + * + * 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; + } + + /** + * Optional. The tags to apply to the instance created by the machine image. + * + * Generated from protobuf field repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. The tags to apply to the instance created by the machine image. + * + * Generated from protobuf field repeated string tags = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @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; + } + + /** + * Optional. Shielded instance configuration. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ShieldedInstanceConfig shielded_instance_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VMMigration\V1\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); + } + + /** + * Optional. Shielded instance configuration. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ShieldedInstanceConfig shielded_instance_config = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VMMigration\V1\ShieldedInstanceConfig $var + * @return $this + */ + public function setShieldedInstanceConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ShieldedInstanceConfig::class); + $this->shielded_instance_config = $var; + + return $this; + } + + /** + * Optional. The network interfaces to create with the instance created by the + * machine image. Internal and external IP addresses, and network tiers are + * ignored for machine image import. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getNetworkInterfaces() + { + return $this->network_interfaces; + } + + /** + * Optional. The network interfaces to create with the instance created by the + * machine image. Internal and external IP addresses, and network tiers are + * ignored for machine image import. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.NetworkInterface network_interfaces = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @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; + } + + /** + * @return string + */ + public function getOsAdaptationConfig() + { + return $this->whichOneof("os_adaptation_config"); + } + +} + 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..41fa47c86dbd --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm.php @@ -0,0 +1,1039 @@ +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. Details 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. Details of the last replication cycle. This will be updated + * whenever a replication cycle is finished and is not to be confused with + * last_sync which is only updated on successful replication cycles. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle last_replication_cycle = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_replication_cycle = 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; + /** + * Output only. Provides details of future CutoverJobs of a MigratingVm. + * Set to empty when cutover forecast is unavailable. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverForecast cutover_forecast = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cutover_forecast = null; + /** + * Output only. Provides details about the expiration state of the migrating + * VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.Expiration expiration = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expiration = null; + 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\ComputeEngineDisksTargetDefaults $compute_engine_disks_target_defaults + * Details of the target Persistent Disks in Compute Engine. + * @type \Google\Cloud\VMMigration\V1\VmwareSourceVmDetails $vmware_source_vm_details + * Output only. Details of the VM from a Vmware source. + * @type \Google\Cloud\VMMigration\V1\AwsSourceVmDetails $aws_source_vm_details + * Output only. Details of the VM from an AWS source. + * @type \Google\Cloud\VMMigration\V1\AzureSourceVmDetails $azure_source_vm_details + * Output only. Details of the VM from an Azure 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. Details of the current running replication cycle. + * @type \Google\Cloud\VMMigration\V1\ReplicationCycle $last_replication_cycle + * Output only. Details of the last replication cycle. This will be updated + * whenever a replication cycle is finished and is not to be confused with + * last_sync which is only updated on successful replication cycles. + * @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. + * @type \Google\Cloud\VMMigration\V1\CutoverForecast $cutover_forecast + * Output only. Provides details of future CutoverJobs of a MigratingVm. + * Set to empty when cutover forecast is unavailable. + * @type \Google\Cloud\VMMigration\V1\MigratingVm\Expiration $expiration + * Output only. Provides details about the expiration state of the migrating + * VM. + * } + */ + 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; + } + + /** + * Details of the target Persistent Disks in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDisksTargetDefaults compute_engine_disks_target_defaults = 34; + * @return \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDefaults|null + */ + public function getComputeEngineDisksTargetDefaults() + { + return $this->readOneof(34); + } + + public function hasComputeEngineDisksTargetDefaults() + { + return $this->hasOneof(34); + } + + /** + * Details of the target Persistent Disks in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDisksTargetDefaults compute_engine_disks_target_defaults = 34; + * @param \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDefaults $var + * @return $this + */ + public function setComputeEngineDisksTargetDefaults($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDefaults::class); + $this->writeOneof(34, $var); + + return $this; + } + + /** + * Output only. Details of the VM from a Vmware source. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareSourceVmDetails vmware_source_vm_details = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\VmwareSourceVmDetails|null + */ + public function getVmwareSourceVmDetails() + { + return $this->readOneof(28); + } + + public function hasVmwareSourceVmDetails() + { + return $this->hasOneof(28); + } + + /** + * Output only. Details of the VM from a Vmware source. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareSourceVmDetails vmware_source_vm_details = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\VmwareSourceVmDetails $var + * @return $this + */ + public function setVmwareSourceVmDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmwareSourceVmDetails::class); + $this->writeOneof(28, $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. Details of the VM from an Azure source. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureSourceVmDetails azure_source_vm_details = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\AzureSourceVmDetails|null + */ + public function getAzureSourceVmDetails() + { + return $this->readOneof(30); + } + + public function hasAzureSourceVmDetails() + { + return $this->hasOneof(30); + } + + /** + * Output only. Details of the VM from an Azure source. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureSourceVmDetails azure_source_vm_details = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\AzureSourceVmDetails $var + * @return $this + */ + public function setAzureSourceVmDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AzureSourceVmDetails::class); + $this->writeOneof(30, $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. Details 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. Details 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. Details of the last replication cycle. This will be updated + * whenever a replication cycle is finished and is not to be confused with + * last_sync which is only updated on successful replication cycles. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle last_replication_cycle = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\ReplicationCycle|null + */ + public function getLastReplicationCycle() + { + return $this->last_replication_cycle; + } + + public function hasLastReplicationCycle() + { + return isset($this->last_replication_cycle); + } + + public function clearLastReplicationCycle() + { + unset($this->last_replication_cycle); + } + + /** + * Output only. Details of the last replication cycle. This will be updated + * whenever a replication cycle is finished and is not to be confused with + * last_sync which is only updated on successful replication cycles. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle last_replication_cycle = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\ReplicationCycle $var + * @return $this + */ + public function setLastReplicationCycle($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicationCycle::class); + $this->last_replication_cycle = $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; + } + + /** + * Output only. Provides details of future CutoverJobs of a MigratingVm. + * Set to empty when cutover forecast is unavailable. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverForecast cutover_forecast = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\CutoverForecast|null + */ + public function getCutoverForecast() + { + return $this->cutover_forecast; + } + + public function hasCutoverForecast() + { + return isset($this->cutover_forecast); + } + + public function clearCutoverForecast() + { + unset($this->cutover_forecast); + } + + /** + * Output only. Provides details of future CutoverJobs of a MigratingVm. + * Set to empty when cutover forecast is unavailable. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverForecast cutover_forecast = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\CutoverForecast $var + * @return $this + */ + public function setCutoverForecast($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\CutoverForecast::class); + $this->cutover_forecast = $var; + + return $this; + } + + /** + * Output only. Provides details about the expiration state of the migrating + * VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.Expiration expiration = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\MigratingVm\Expiration|null + */ + public function getExpiration() + { + return $this->expiration; + } + + public function hasExpiration() + { + return isset($this->expiration); + } + + public function clearExpiration() + { + unset($this->expiration); + } + + /** + * Output only. Provides details about the expiration state of the migrating + * VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.Expiration expiration = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\MigratingVm\Expiration $var + * @return $this + */ + public function setExpiration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\MigratingVm\Expiration::class); + $this->expiration = $var; + + 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/Expiration.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/Expiration.php new file mode 100644 index 000000000000..5360a02b046b --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/Expiration.php @@ -0,0 +1,148 @@ +google.cloud.vmmigration.v1.MigratingVm.Expiration + */ +class Expiration extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Timestamp of when this resource is considered expired. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Output only. The number of times expiration was extended. + * + * Generated from protobuf field int32 extension_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $extension_count = 0; + /** + * Output only. Describes whether the expiration can be extended. + * + * Generated from protobuf field bool extendable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $extendable = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. Timestamp of when this resource is considered expired. + * @type int $extension_count + * Output only. The number of times expiration was extended. + * @type bool $extendable + * Output only. Describes whether the expiration can be extended. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Timestamp of when this resource is considered expired. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 1 [(.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. Timestamp of when this resource is considered expired. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 1 [(.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. The number of times expiration was extended. + * + * Generated from protobuf field int32 extension_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getExtensionCount() + { + return $this->extension_count; + } + + /** + * Output only. The number of times expiration was extended. + * + * Generated from protobuf field int32 extension_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setExtensionCount($var) + { + GPBUtil::checkInt32($var); + $this->extension_count = $var; + + return $this; + } + + /** + * Output only. Describes whether the expiration can be extended. + * + * Generated from protobuf field bool extendable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getExtendable() + { + return $this->extendable; + } + + /** + * Output only. Describes whether the expiration can be extended. + * + * Generated from protobuf field bool extendable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setExtendable($var) + { + GPBUtil::checkBool($var); + $this->extendable = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Expiration::class, \Google\Cloud\VMMigration\V1\MigratingVm_Expiration::class); + 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..81e1da94caf9 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/State.php @@ -0,0 +1,150 @@ +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; + /** + * The migrating VM has passed its expiration date. It might be possible to + * bring it back to "Active" state by updating the TTL field. For more + * information, see the documentation. + * + * Generated from protobuf enum EXPIRED = 14; + */ + const EXPIRED = 14; + /** + * The migrating VM's has been finalized and migration resources have been + * removed. + * + * Generated from protobuf enum FINALIZED_EXPIRED = 17; + */ + const FINALIZED_EXPIRED = 17; + + 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', + self::EXPIRED => 'EXPIRED', + self::FINALIZED_EXPIRED => 'FINALIZED_EXPIRED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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..c0b141685209 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError/ErrorCode.php @@ -0,0 +1,134 @@ +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 to Virtual Machines encountered an unknown error. + * + * Generated from protobuf enum UNKNOWN_ERROR = 1; + */ + const UNKNOWN_ERROR = 1; + /** + * Migrate to Virtual Machines encountered an error while validating + * replication source health. + * + * Generated from protobuf enum SOURCE_VALIDATION_ERROR = 2; + */ + const SOURCE_VALIDATION_ERROR = 2; + /** + * Migrate to Virtual Machines encountered an error during source data + * operation. + * + * Generated from protobuf enum SOURCE_REPLICATION_ERROR = 3; + */ + const SOURCE_REPLICATION_ERROR = 3; + /** + * Migrate to Virtual Machines encountered an error during target data + * operation. + * + * Generated from protobuf enum TARGET_REPLICATION_ERROR = 4; + */ + const TARGET_REPLICATION_ERROR = 4; + /** + * Migrate to Virtual Machines encountered an error during OS adaptation. + * + * Generated from protobuf enum OS_ADAPTATION_ERROR = 5; + */ + const OS_ADAPTATION_ERROR = 5; + /** + * Migrate to Virtual Machines encountered an error in clone operation. + * + * Generated from protobuf enum CLONE_ERROR = 6; + */ + const CLONE_ERROR = 6; + /** + * Migrate to Virtual Machines encountered an error in cutover operation. + * + * Generated from protobuf enum CUTOVER_ERROR = 7; + */ + const CUTOVER_ERROR = 7; + /** + * Migrate to Virtual Machines encountered an error during utilization + * report creation. + * + * Generated from protobuf enum UTILIZATION_REPORT_ERROR = 8; + */ + const UTILIZATION_REPORT_ERROR = 8; + /** + * Migrate to Virtual Machines encountered an error during appliance + * upgrade. + * + * Generated from protobuf enum APPLIANCE_UPGRADE_ERROR = 9; + */ + const APPLIANCE_UPGRADE_ERROR = 9; + /** + * Migrate to Virtual Machines encountered an error in image import + * operation. + * + * Generated from protobuf enum IMAGE_IMPORT_ERROR = 10; + */ + const IMAGE_IMPORT_ERROR = 10; + /** + * Migrate to Virtual Machines encountered an error in disk migration + * operation. + * + * Generated from protobuf enum DISK_MIGRATION_ERROR = 11; + */ + const DISK_MIGRATION_ERROR = 11; + + 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', + self::IMAGE_IMPORT_ERROR => 'IMAGE_IMPORT_ERROR', + self::DISK_MIGRATION_ERROR => 'DISK_MIGRATION_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/MigrationWarning.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationWarning.php new file mode 100644 index 000000000000..81976622d8dd --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationWarning.php @@ -0,0 +1,239 @@ +google.cloud.vmmigration.v1.MigrationWarning + */ +class MigrationWarning extends \Google\Protobuf\Internal\Message +{ + /** + * The warning code. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigrationWarning.WarningCode code = 1; + */ + protected $code = 0; + /** + * Output only. The localized warning message. + * + * Generated from protobuf field .google.rpc.LocalizedMessage warning_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $warning_message = null; + /** + * Output only. Suggested action for solving the warning. + * + * 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 warning. + * + * Generated from protobuf field repeated .google.rpc.Help.Link help_links = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $help_links; + /** + * The time the warning occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp warning_time = 5; + */ + protected $warning_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $code + * The warning code. + * @type \Google\Rpc\LocalizedMessage $warning_message + * Output only. The localized warning message. + * @type \Google\Rpc\LocalizedMessage $action_item + * Output only. Suggested action for solving the warning. + * @type array<\Google\Rpc\Help\Link>|\Google\Protobuf\Internal\RepeatedField $help_links + * Output only. URL(s) pointing to additional information on handling the + * current warning. + * @type \Google\Protobuf\Timestamp $warning_time + * The time the warning occurred. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The warning code. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigrationWarning.WarningCode code = 1; + * @return int + */ + public function getCode() + { + return $this->code; + } + + /** + * The warning code. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigrationWarning.WarningCode code = 1; + * @param int $var + * @return $this + */ + public function setCode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\MigrationWarning\WarningCode::class); + $this->code = $var; + + return $this; + } + + /** + * Output only. The localized warning message. + * + * Generated from protobuf field .google.rpc.LocalizedMessage warning_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Rpc\LocalizedMessage|null + */ + public function getWarningMessage() + { + return $this->warning_message; + } + + public function hasWarningMessage() + { + return isset($this->warning_message); + } + + public function clearWarningMessage() + { + unset($this->warning_message); + } + + /** + * Output only. The localized warning message. + * + * Generated from protobuf field .google.rpc.LocalizedMessage warning_message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Rpc\LocalizedMessage $var + * @return $this + */ + public function setWarningMessage($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\LocalizedMessage::class); + $this->warning_message = $var; + + return $this; + } + + /** + * Output only. Suggested action for solving the warning. + * + * 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 warning. + * + * 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 warning. + * + * 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 warning. + * + * 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; + } + + /** + * The time the warning occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp warning_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getWarningTime() + { + return $this->warning_time; + } + + public function hasWarningTime() + { + return isset($this->warning_time); + } + + public function clearWarningTime() + { + unset($this->warning_time); + } + + /** + * The time the warning occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp warning_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setWarningTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->warning_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationWarning/WarningCode.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationWarning/WarningCode.php new file mode 100644 index 000000000000..29076ae15ad8 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationWarning/WarningCode.php @@ -0,0 +1,57 @@ +google.cloud.vmmigration.v1.MigrationWarning.WarningCode + */ +class WarningCode +{ + /** + * Default value. This value is not used. + * + * Generated from protobuf enum WARNING_CODE_UNSPECIFIED = 0; + */ + const WARNING_CODE_UNSPECIFIED = 0; + /** + * A warning originated from OS Adaptation. + * + * Generated from protobuf enum ADAPTATION_WARNING = 1; + */ + const ADAPTATION_WARNING = 1; + + private static $valueToName = [ + self::WARNING_CODE_UNSPECIFIED => 'WARNING_CODE_UNSPECIFIED', + self::ADAPTATION_WARNING => 'ADAPTATION_WARNING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(WarningCode::class, \Google\Cloud\VMMigration\V1\MigrationWarning_WarningCode::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..2da4d08f8b54 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/NetworkInterface.php @@ -0,0 +1,219 @@ +google.cloud.vmmigration.v1.NetworkInterface + */ +class NetworkInterface extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The network to connect the NIC to. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $network = ''; + /** + * Optional. The subnetwork to connect the NIC to. + * + * Generated from protobuf field string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $subnetwork = ''; + /** + * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $internal_ip = ''; + /** + * Optional. The external IP to define in the NIC. + * + * Generated from protobuf field string external_ip = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $external_ip = ''; + /** + * Optional. The networking tier used for optimizing connectivity between + * instances and systems on the internet. Applies only for external ephemeral + * IP addresses. If left empty, will default to PREMIUM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineNetworkTier network_tier = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $network_tier = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $network + * Optional. The network to connect the NIC to. + * @type string $subnetwork + * Optional. The subnetwork to connect the NIC to. + * @type string $internal_ip + * Optional. 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 + * Optional. The external IP to define in the NIC. + * @type int $network_tier + * Optional. The networking tier used for optimizing connectivity between + * instances and systems on the internet. Applies only for external ephemeral + * IP addresses. If left empty, will default to PREMIUM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The network to connect the NIC to. + * + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getNetwork() + { + return $this->network; + } + + /** + * Optional. The network to connect the NIC to. + * + * 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. The subnetwork to connect the NIC to. + * + * Generated from protobuf field string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSubnetwork() + { + return $this->subnetwork; + } + + /** + * Optional. The subnetwork to connect the NIC to. + * + * Generated from protobuf field string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSubnetwork($var) + { + GPBUtil::checkString($var, True); + $this->subnetwork = $var; + + return $this; + } + + /** + * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getInternalIp() + { + return $this->internal_ip; + } + + /** + * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setInternalIp($var) + { + GPBUtil::checkString($var, True); + $this->internal_ip = $var; + + return $this; + } + + /** + * Optional. The external IP to define in the NIC. + * + * Generated from protobuf field string external_ip = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getExternalIp() + { + return $this->external_ip; + } + + /** + * Optional. The external IP to define in the NIC. + * + * Generated from protobuf field string external_ip = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setExternalIp($var) + { + GPBUtil::checkString($var, True); + $this->external_ip = $var; + + return $this; + } + + /** + * Optional. The networking tier used for optimizing connectivity between + * instances and systems on the internet. Applies only for external ephemeral + * IP addresses. If left empty, will default to PREMIUM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineNetworkTier network_tier = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getNetworkTier() + { + return $this->network_tier; + } + + /** + * Optional. The networking tier used for optimizing connectivity between + * instances and systems on the internet. Applies only for external ephemeral + * IP addresses. If left empty, will default to PREMIUM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineNetworkTier network_tier = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setNetworkTier($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineNetworkTier::class); + $this->network_tier = $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/OsCapability.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/OsCapability.php new file mode 100644 index 000000000000..2ff3ca571273 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/OsCapability.php @@ -0,0 +1,69 @@ +google.cloud.vmmigration.v1.OsCapability + */ +class OsCapability +{ + /** + * This is for API compatibility only and is not in use. + * + * Generated from protobuf enum OS_CAPABILITY_UNSPECIFIED = 0; + */ + const OS_CAPABILITY_UNSPECIFIED = 0; + /** + * NVMe driver installed and the VM can use NVMe PD or local SSD. + * + * Generated from protobuf enum OS_CAPABILITY_NVME_STORAGE_ACCESS = 1; + */ + const OS_CAPABILITY_NVME_STORAGE_ACCESS = 1; + /** + * gVNIC virtual NIC driver supported. + * + * Generated from protobuf enum OS_CAPABILITY_GVNIC_NETWORK_INTERFACE = 2; + */ + const OS_CAPABILITY_GVNIC_NETWORK_INTERFACE = 2; + /** + * IDPF virtual NIC driver supported. + * + * Generated from protobuf enum OS_CAPABILITY_IDPF_NETWORK_INTERFACE = 3; + */ + const OS_CAPABILITY_IDPF_NETWORK_INTERFACE = 3; + + private static $valueToName = [ + self::OS_CAPABILITY_UNSPECIFIED => 'OS_CAPABILITY_UNSPECIFIED', + self::OS_CAPABILITY_NVME_STORAGE_ACCESS => 'OS_CAPABILITY_NVME_STORAGE_ACCESS', + self::OS_CAPABILITY_GVNIC_NETWORK_INTERFACE => 'OS_CAPABILITY_GVNIC_NETWORK_INTERFACE', + self::OS_CAPABILITY_IDPF_NETWORK_INTERFACE => 'OS_CAPABILITY_IDPF_NETWORK_INTERFACE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + 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/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/PersistentDisk.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PersistentDisk.php new file mode 100644 index 000000000000..555f047a74f0 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PersistentDisk.php @@ -0,0 +1,101 @@ +google.cloud.vmmigration.v1.PersistentDisk + */ +class PersistentDisk extends \Google\Protobuf\Internal\Message +{ + /** + * The ordinal number of the source VM disk. + * + * Generated from protobuf field int32 source_disk_number = 1; + */ + protected $source_disk_number = 0; + /** + * The URI of the Persistent Disk. + * + * Generated from protobuf field string disk_uri = 2; + */ + protected $disk_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $source_disk_number + * The ordinal number of the source VM disk. + * @type string $disk_uri + * The URI of the Persistent Disk. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * The ordinal number of the source VM disk. + * + * Generated from protobuf field int32 source_disk_number = 1; + * @return int + */ + public function getSourceDiskNumber() + { + return $this->source_disk_number; + } + + /** + * The ordinal number of the source VM disk. + * + * Generated from protobuf field int32 source_disk_number = 1; + * @param int $var + * @return $this + */ + public function setSourceDiskNumber($var) + { + GPBUtil::checkInt32($var); + $this->source_disk_number = $var; + + return $this; + } + + /** + * The URI of the Persistent Disk. + * + * Generated from protobuf field string disk_uri = 2; + * @return string + */ + public function getDiskUri() + { + return $this->disk_uri; + } + + /** + * The URI of the Persistent Disk. + * + * Generated from protobuf field string disk_uri = 2; + * @param string $var + * @return $this + */ + public function setDiskUri($var) + { + GPBUtil::checkString($var, True); + $this->disk_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PersistentDiskDefaults.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PersistentDiskDefaults.php new file mode 100644 index 000000000000..4cdf630fbfea --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PersistentDiskDefaults.php @@ -0,0 +1,261 @@ +google.cloud.vmmigration.v1.PersistentDiskDefaults + */ +class PersistentDiskDefaults extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The ordinal number of the source VM disk. + * + * Generated from protobuf field int32 source_disk_number = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $source_disk_number = 0; + /** + * Optional. The name of the Persistent Disk to create. + * + * Generated from protobuf field string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disk_name = ''; + /** + * The disk type to use. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 3; + */ + protected $disk_type = 0; + /** + * A map of labels to associate with the Persistent Disk. + * + * Generated from protobuf field map additional_labels = 4; + */ + private $additional_labels; + /** + * Optional. The encryption to apply to the disk. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encryption = null; + /** + * Optional. Details for attachment of the disk to a VM. + * Used when the disk is set to be attached to a target VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmAttachmentDetails vm_attachment_details = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $vm_attachment_details = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $source_disk_number + * Required. The ordinal number of the source VM disk. + * @type string $disk_name + * Optional. The name of the Persistent Disk to create. + * @type int $disk_type + * The disk type to use. + * @type array|\Google\Protobuf\Internal\MapField $additional_labels + * A map of labels to associate with the Persistent Disk. + * @type \Google\Cloud\VMMigration\V1\Encryption $encryption + * Optional. The encryption to apply to the disk. + * @type \Google\Cloud\VMMigration\V1\VmAttachmentDetails $vm_attachment_details + * Optional. Details for attachment of the disk to a VM. + * Used when the disk is set to be attached to a target VM. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The ordinal number of the source VM disk. + * + * Generated from protobuf field int32 source_disk_number = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getSourceDiskNumber() + { + return $this->source_disk_number; + } + + /** + * Required. The ordinal number of the source VM disk. + * + * Generated from protobuf field int32 source_disk_number = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setSourceDiskNumber($var) + { + GPBUtil::checkInt32($var); + $this->source_disk_number = $var; + + return $this; + } + + /** + * Optional. The name of the Persistent Disk to create. + * + * Generated from protobuf field string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDiskName() + { + return $this->disk_name; + } + + /** + * Optional. The name of the Persistent Disk to create. + * + * Generated from protobuf field string disk_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDiskName($var) + { + GPBUtil::checkString($var, True); + $this->disk_name = $var; + + return $this; + } + + /** + * The disk type to use. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 3; + * @return int + */ + public function getDiskType() + { + return $this->disk_type; + } + + /** + * The disk type to use. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDiskType disk_type = 3; + * @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 Persistent Disk. + * + * Generated from protobuf field map additional_labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAdditionalLabels() + { + return $this->additional_labels; + } + + /** + * A map of labels to associate with the Persistent Disk. + * + * Generated from protobuf field map additional_labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAdditionalLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->additional_labels = $arr; + + return $this; + } + + /** + * Optional. The encryption to apply to the disk. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VMMigration\V1\Encryption|null + */ + public function getEncryption() + { + return $this->encryption; + } + + public function hasEncryption() + { + return isset($this->encryption); + } + + public function clearEncryption() + { + unset($this->encryption); + } + + /** + * Optional. The encryption to apply to the disk. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VMMigration\V1\Encryption $var + * @return $this + */ + public function setEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Encryption::class); + $this->encryption = $var; + + return $this; + } + + /** + * Optional. Details for attachment of the disk to a VM. + * Used when the disk is set to be attached to a target VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmAttachmentDetails vm_attachment_details = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VMMigration\V1\VmAttachmentDetails|null + */ + public function getVmAttachmentDetails() + { + return $this->vm_attachment_details; + } + + public function hasVmAttachmentDetails() + { + return isset($this->vm_attachment_details); + } + + public function clearVmAttachmentDetails() + { + unset($this->vm_attachment_details); + } + + /** + * Optional. Details for attachment of the disk to a VM. + * Used when the disk is set to be attached to a target VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmAttachmentDetails vm_attachment_details = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VMMigration\V1\VmAttachmentDetails $var + * @return $this + */ + public function setVmAttachmentDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmAttachmentDetails::class); + $this->vm_attachment_details = $var; + + return $this; + } + +} + 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/ProvisioningTargetDiskStep.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ProvisioningTargetDiskStep.php new file mode 100644 index 000000000000..3e3fce1f0400 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ProvisioningTargetDiskStep.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.ProvisioningTargetDiskStep + */ +class ProvisioningTargetDiskStep 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..639b3d34f93e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle.php @@ -0,0 +1,433 @@ +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; + /** + * Output only. Provides details on the state of the cycle in case of an + * error. + * + * Generated from protobuf field .google.rpc.Status error = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $error = null; + /** + * Output only. Warnings that occurred during the cycle. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigrationWarning warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $warnings; + + /** + * 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 + * Output only. Provides details on the state of the cycle in case of an + * error. + * @type array<\Google\Cloud\VMMigration\V1\MigrationWarning>|\Google\Protobuf\Internal\RepeatedField $warnings + * Output only. Warnings that occurred during the cycle. + * } + */ + 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() + { + if ($this->progress_percent !== 0) { + @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; + } + + /** + * Output only. Provides details on the state of the cycle in case of an + * error. + * + * 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. Provides details on the state of the cycle in case of an + * error. + * + * 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; + } + + /** + * Output only. Warnings that occurred during the cycle. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigrationWarning warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWarnings() + { + return $this->warnings; + } + + /** + * Output only. Warnings that occurred during the cycle. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigrationWarning warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\MigrationWarning>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWarnings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\MigrationWarning::class); + $this->warnings = $arr; + + 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/RunDiskMigrationJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RunDiskMigrationJobRequest.php new file mode 100644 index 000000000000..1efc879b69e3 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RunDiskMigrationJobRequest.php @@ -0,0 +1,81 @@ +google.cloud.vmmigration.v1.RunDiskMigrationJobRequest + */ +class RunDiskMigrationJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the DiskMigrationJob. + * + * 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 DiskMigrationJob. Please see + * {@see VmMigrationClient::diskMigrationJobName()} for help formatting this field. + * + * @return \Google\Cloud\VMMigration\V1\RunDiskMigrationJobRequest + * + * @experimental + */ + public static function build(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 DiskMigrationJob. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the DiskMigrationJob. + * + * Generated from 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 DiskMigrationJob. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @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/RunDiskMigrationJobResponse.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RunDiskMigrationJobResponse.php new file mode 100644 index 000000000000..6e733db7fce7 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RunDiskMigrationJobResponse.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.RunDiskMigrationJobResponse + */ +class RunDiskMigrationJobResponse 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/ServiceAccount.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ServiceAccount.php new file mode 100644 index 000000000000..1da5072e17f9 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ServiceAccount.php @@ -0,0 +1,101 @@ +google.cloud.vmmigration.v1.ServiceAccount + */ +class ServiceAccount extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The email address of the service account. + * + * Generated from protobuf field string email = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $email = ''; + /** + * Optional. The list of scopes to be made available for this service account. + * + * Generated from protobuf field repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $scopes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $email + * Required. The email address of the service account. + * @type array|\Google\Protobuf\Internal\RepeatedField $scopes + * Optional. The list of scopes to be made available for this service account. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Required. The email address of the service account. + * + * Generated from protobuf field string email = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getEmail() + { + return $this->email; + } + + /** + * Required. The email address of the service account. + * + * Generated from protobuf field string email = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEmail($var) + { + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + + /** + * Optional. The list of scopes to be made available for this service account. + * + * Generated from protobuf field repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getScopes() + { + return $this->scopes; + } + + /** + * Optional. The list of scopes to be made available for this service account. + * + * Generated from protobuf field repeated string scopes = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setScopes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->scopes = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShieldedInstanceConfig.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShieldedInstanceConfig.php new file mode 100644 index 000000000000..72a85e698bb8 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShieldedInstanceConfig.php @@ -0,0 +1,155 @@ +google.cloud.vmmigration.v1.ShieldedInstanceConfig + */ +class ShieldedInstanceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Defines whether the instance created by the machine image has + * Secure Boot enabled. This can be set to true only if the image boot option + * is EFI. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ShieldedInstanceConfig.SecureBoot secure_boot = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $secure_boot = 0; + /** + * Optional. Defines whether the instance created by the machine image has + * vTPM enabled. This can be set to true only if the image boot option is EFI. + * + * Generated from protobuf field bool enable_vtpm = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_vtpm = false; + /** + * Optional. Defines whether the instance created by the machine image has + * integrity monitoring enabled. This can be set to true only if the image + * boot option is EFI, and vTPM is enabled. + * + * Generated from protobuf field bool enable_integrity_monitoring = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_integrity_monitoring = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $secure_boot + * Optional. Defines whether the instance created by the machine image has + * Secure Boot enabled. This can be set to true only if the image boot option + * is EFI. + * @type bool $enable_vtpm + * Optional. Defines whether the instance created by the machine image has + * vTPM enabled. This can be set to true only if the image boot option is EFI. + * @type bool $enable_integrity_monitoring + * Optional. Defines whether the instance created by the machine image has + * integrity monitoring enabled. This can be set to true only if the image + * boot option is EFI, and vTPM is enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Defines whether the instance created by the machine image has + * Secure Boot enabled. This can be set to true only if the image boot option + * is EFI. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ShieldedInstanceConfig.SecureBoot secure_boot = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSecureBoot() + { + return $this->secure_boot; + } + + /** + * Optional. Defines whether the instance created by the machine image has + * Secure Boot enabled. This can be set to true only if the image boot option + * is EFI. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ShieldedInstanceConfig.SecureBoot secure_boot = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSecureBoot($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ShieldedInstanceConfig\SecureBoot::class); + $this->secure_boot = $var; + + return $this; + } + + /** + * Optional. Defines whether the instance created by the machine image has + * vTPM enabled. This can be set to true only if the image boot option is EFI. + * + * Generated from protobuf field bool enable_vtpm = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableVtpm() + { + return $this->enable_vtpm; + } + + /** + * Optional. Defines whether the instance created by the machine image has + * vTPM enabled. This can be set to true only if the image boot option is EFI. + * + * Generated from protobuf field bool enable_vtpm = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableVtpm($var) + { + GPBUtil::checkBool($var); + $this->enable_vtpm = $var; + + return $this; + } + + /** + * Optional. Defines whether the instance created by the machine image has + * integrity monitoring enabled. This can be set to true only if the image + * boot option is EFI, and vTPM is enabled. + * + * Generated from protobuf field bool enable_integrity_monitoring = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableIntegrityMonitoring() + { + return $this->enable_integrity_monitoring; + } + + /** + * Optional. Defines whether the instance created by the machine image has + * integrity monitoring enabled. This can be set to true only if the image + * boot option is EFI, and vTPM is enabled. + * + * Generated from protobuf field bool enable_integrity_monitoring = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableIntegrityMonitoring($var) + { + GPBUtil::checkBool($var); + $this->enable_integrity_monitoring = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShieldedInstanceConfig/SecureBoot.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShieldedInstanceConfig/SecureBoot.php new file mode 100644 index 000000000000..320c9523e4c1 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShieldedInstanceConfig/SecureBoot.php @@ -0,0 +1,66 @@ +google.cloud.vmmigration.v1.ShieldedInstanceConfig.SecureBoot + */ +class SecureBoot +{ + /** + * No explicit value is selected. Will use the configuration of the source + * (if exists, otherwise the default will be false). + * + * Generated from protobuf enum SECURE_BOOT_UNSPECIFIED = 0; + */ + const SECURE_BOOT_UNSPECIFIED = 0; + /** + * Use secure boot. This can be set to true only if the image boot option is + * EFI. + * + * Generated from protobuf enum TRUE = 1; + */ + const TRUE = 1; + /** + * Do not use secure boot. + * + * Generated from protobuf enum FALSE = 2; + */ + const FALSE = 2; + + private static $valueToName = [ + self::SECURE_BOOT_UNSPECIFIED => 'SECURE_BOOT_UNSPECIFIED', + self::TRUE => 'TRUE', + self::FALSE => 'FALSE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SecureBoot::class, \Google\Cloud\VMMigration\V1\ShieldedInstanceConfig_SecureBoot::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/SkipOsAdaptation.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SkipOsAdaptation.php new file mode 100644 index 000000000000..1722d0419a41 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SkipOsAdaptation.php @@ -0,0 +1,33 @@ +google.cloud.vmmigration.v1.SkipOsAdaptation + */ +class SkipOsAdaptation 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..64e8c843ffe2 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Source.php @@ -0,0 +1,380 @@ +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 = ''; + /** + * Optional. Immutable. The encryption details of the source data stored by + * the service. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $encryption = null; + 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 \Google\Cloud\VMMigration\V1\AzureSourceDetails $azure + * Azure 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. + * @type \Google\Cloud\VMMigration\V1\Encryption $encryption + * Optional. Immutable. The encryption details of the source data stored by + * the service. + * } + */ + 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; + } + + /** + * Azure type source details. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureSourceDetails azure = 13; + * @return \Google\Cloud\VMMigration\V1\AzureSourceDetails|null + */ + public function getAzure() + { + return $this->readOneof(13); + } + + public function hasAzure() + { + return $this->hasOneof(13); + } + + /** + * Azure type source details. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureSourceDetails azure = 13; + * @param \Google\Cloud\VMMigration\V1\AzureSourceDetails $var + * @return $this + */ + public function setAzure($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AzureSourceDetails::class); + $this->writeOneof(13, $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; + } + + /** + * Optional. Immutable. The encryption details of the source data stored by + * the service. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\VMMigration\V1\Encryption|null + */ + public function getEncryption() + { + return $this->encryption; + } + + public function hasEncryption() + { + return isset($this->encryption); + } + + public function clearEncryption() + { + unset($this->encryption); + } + + /** + * Optional. Immutable. The encryption details of the source data stored by + * the service. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\VMMigration\V1\Encryption $var + * @return $this + */ + public function setEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Encryption::class); + $this->encryption = $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/SourceStorageResource.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SourceStorageResource.php new file mode 100644 index 000000000000..865571297a61 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SourceStorageResource.php @@ -0,0 +1,75 @@ +google.cloud.vmmigration.v1.SourceStorageResource + */ +class SourceStorageResource extends \Google\Protobuf\Internal\Message +{ + protected $StorageResource; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VMMigration\V1\AwsSourceDiskDetails $aws_disk_details + * Source AWS volume details. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Source AWS volume details. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDiskDetails aws_disk_details = 1; + * @return \Google\Cloud\VMMigration\V1\AwsSourceDiskDetails|null + */ + public function getAwsDiskDetails() + { + return $this->readOneof(1); + } + + public function hasAwsDiskDetails() + { + return $this->hasOneof(1); + } + + /** + * Source AWS volume details. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceDiskDetails aws_disk_details = 1; + * @param \Google\Cloud\VMMigration\V1\AwsSourceDiskDetails $var + * @return $this + */ + public function setAwsDiskDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AwsSourceDiskDetails::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getStorageResource() + { + return $this->whichOneof("StorageResource"); + } + +} + 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..0873fbf6555d --- /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 = ''; + /** + * Required. The target project ID (number) or project name. + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + 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 + * Required. 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; + } + + /** + * Required. The target project ID (number) or project name. + * + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProject() + { + return $this->project; + } + + /** + * Required. The target project ID (number) or project name. + * + * 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; + } + + /** + * 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/UpdateDiskMigrationJobRequest.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateDiskMigrationJobRequest.php new file mode 100644 index 000000000000..5c5e7b119b68 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateDiskMigrationJobRequest.php @@ -0,0 +1,235 @@ +google.cloud.vmmigration.v1.UpdateDiskMigrationJobRequest + */ +class UpdateDiskMigrationJobRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * DiskMigrationJob resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask, then a mask equivalent to all fields that are + * populated (have a non-empty value), will be implied. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DiskMigrationJob disk_migration_job = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $disk_migration_job = 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 timed out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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, (.google.api.field_info) = { + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VMMigration\V1\DiskMigrationJob $diskMigrationJob Required. The update request body. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * DiskMigrationJob resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask, then a mask equivalent to all fields that are + * populated (have a non-empty value), will be implied. + * + * @return \Google\Cloud\VMMigration\V1\UpdateDiskMigrationJobRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VMMigration\V1\DiskMigrationJob $diskMigrationJob, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDiskMigrationJob($diskMigrationJob) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * DiskMigrationJob resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask, then a mask equivalent to all fields that are + * populated (have a non-empty value), will be implied. + * @type \Google\Cloud\VMMigration\V1\DiskMigrationJob $disk_migration_job + * Required. The update request body. + * @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 timed out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * DiskMigrationJob resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask, then a mask equivalent to all fields that are + * populated (have a non-empty value), will be implied. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * DiskMigrationJob resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask, then a mask equivalent to all fields that are + * populated (have a non-empty value), will be implied. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DiskMigrationJob disk_migration_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VMMigration\V1\DiskMigrationJob|null + */ + public function getDiskMigrationJob() + { + return $this->disk_migration_job; + } + + public function hasDiskMigrationJob() + { + return isset($this->disk_migration_job); + } + + public function clearDiskMigrationJob() + { + unset($this->disk_migration_job); + } + + /** + * Required. The update request body. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.DiskMigrationJob disk_migration_job = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VMMigration\V1\DiskMigrationJob $var + * @return $this + */ + public function setDiskMigrationJob($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\DiskMigrationJob::class); + $this->disk_migration_job = $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 timed out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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, (.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 timed out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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, (.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/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..aee8dc2cfe74 --- /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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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/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..ece9ca29fdc3 --- /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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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/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..ceda1257271e --- /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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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/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..ae1b70e4fbe9 --- /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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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/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..b30ae788955e --- /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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating 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 + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be 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/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..de974a62e49f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus.php @@ -0,0 +1,227 @@ +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; + /** + * Output only. Provides details on the state of the upgrade operation in case + * of an error. + * + * Generated from protobuf field .google.rpc.Status error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + 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 + * Output only. 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; + } + + /** + * Output only. Provides details on the state of the upgrade operation in case + * of an error. + * + * Generated from protobuf field .google.rpc.Status error = 3 [(.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 upgrade operation in case + * of an error. + * + * Generated from protobuf field .google.rpc.Status error = 3 [(.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 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/VmArchitecture.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmArchitecture.php new file mode 100644 index 000000000000..7a1f3b7dac9f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmArchitecture.php @@ -0,0 +1,61 @@ +google.cloud.vmmigration.v1.VmArchitecture + */ +class VmArchitecture +{ + /** + * The architecture is unknown. + * + * Generated from protobuf enum VM_ARCHITECTURE_UNSPECIFIED = 0; + */ + const VM_ARCHITECTURE_UNSPECIFIED = 0; + /** + * The architecture is one of the x86 architectures. + * + * Generated from protobuf enum VM_ARCHITECTURE_X86_FAMILY = 1; + */ + const VM_ARCHITECTURE_X86_FAMILY = 1; + /** + * The architecture is ARM64. + * + * Generated from protobuf enum VM_ARCHITECTURE_ARM64 = 2; + */ + const VM_ARCHITECTURE_ARM64 = 2; + + private static $valueToName = [ + self::VM_ARCHITECTURE_UNSPECIFIED => 'VM_ARCHITECTURE_UNSPECIFIED', + self::VM_ARCHITECTURE_X86_FAMILY => 'VM_ARCHITECTURE_X86_FAMILY', + self::VM_ARCHITECTURE_ARM64 => 'VM_ARCHITECTURE_ARM64', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + 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/VmAttachmentDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmAttachmentDetails.php new file mode 100644 index 000000000000..a1e8872823da --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmAttachmentDetails.php @@ -0,0 +1,87 @@ +google.cloud.vmmigration.v1.VmAttachmentDetails + */ +class VmAttachmentDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Specifies a unique device name of your choice that is reflected + * into the /dev/disk/by-id/google-* tree of a Linux operating system running + * within the instance. If not specified, the server chooses a default device + * name to apply to this disk, in the form persistent-disk-x, where x is a + * number assigned by Google Compute Engine. This field is only applicable for + * persistent disks. + * + * Generated from protobuf field string device_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $device_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $device_name + * Optional. Specifies a unique device name of your choice that is reflected + * into the /dev/disk/by-id/google-* tree of a Linux operating system running + * within the instance. If not specified, the server chooses a default device + * name to apply to this disk, in the form persistent-disk-x, where x is a + * number assigned by Google Compute Engine. This field is only applicable for + * persistent disks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Specifies a unique device name of your choice that is reflected + * into the /dev/disk/by-id/google-* tree of a Linux operating system running + * within the instance. If not specified, the server chooses a default device + * name to apply to this disk, in the form persistent-disk-x, where x is a + * number assigned by Google Compute Engine. This field is only applicable for + * persistent disks. + * + * Generated from protobuf field string device_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDeviceName() + { + return $this->device_name; + } + + /** + * Optional. Specifies a unique device name of your choice that is reflected + * into the /dev/disk/by-id/google-* tree of a Linux operating system running + * within the instance. If not specified, the server chooses a default device + * name to apply to this disk, in the form persistent-disk-x, where x is a + * number assigned by Google Compute Engine. This field is only applicable for + * persistent disks. + * + * Generated from protobuf field string device_name = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDeviceName($var) + { + GPBUtil::checkString($var, True); + $this->device_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmCapabilities.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmCapabilities.php new file mode 100644 index 000000000000..fd4b3ccb610a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmCapabilities.php @@ -0,0 +1,116 @@ +google.cloud.vmmigration.v1.VmCapabilities + */ +class VmCapabilities extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Unordered list. List of certain VM OS capabilities needed for + * some Compute Engine features. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.OsCapability os_capabilities = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = UNORDERED_LIST]; + */ + private $os_capabilities; + /** + * Output only. The last time OS capabilities list was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_os_capabilities_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_os_capabilities_update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\RepeatedField $os_capabilities + * Output only. Unordered list. List of certain VM OS capabilities needed for + * some Compute Engine features. + * @type \Google\Protobuf\Timestamp $last_os_capabilities_update_time + * Output only. The last time OS capabilities list was updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Unordered list. List of certain VM OS capabilities needed for + * some Compute Engine features. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.OsCapability os_capabilities = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = UNORDERED_LIST]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getOsCapabilities() + { + return $this->os_capabilities; + } + + /** + * Output only. Unordered list. List of certain VM OS capabilities needed for + * some Compute Engine features. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.OsCapability os_capabilities = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = UNORDERED_LIST]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setOsCapabilities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\VMMigration\V1\OsCapability::class); + $this->os_capabilities = $arr; + + return $this; + } + + /** + * Output only. The last time OS capabilities list was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_os_capabilities_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastOsCapabilitiesUpdateTime() + { + return $this->last_os_capabilities_update_time; + } + + public function hasLastOsCapabilitiesUpdateTime() + { + return isset($this->last_os_capabilities_update_time); + } + + public function clearLastOsCapabilitiesUpdateTime() + { + unset($this->last_os_capabilities_update_time); + } + + /** + * Output only. The last time OS capabilities list was updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_os_capabilities_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastOsCapabilitiesUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_os_capabilities_update_time = $var; + + return $this; + } + +} + 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..a1382ea205c4 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceDetails.php @@ -0,0 +1,208 @@ +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 = ''; + /** + * The hostname of the vcenter. + * + * Generated from protobuf field string resolved_vcenter_host = 5; + */ + protected $resolved_vcenter_host = ''; + + /** + * 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. + * @type string $resolved_vcenter_host + * The hostname of 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; + } + + /** + * The hostname of the vcenter. + * + * Generated from protobuf field string resolved_vcenter_host = 5; + * @return string + */ + public function getResolvedVcenterHost() + { + return $this->resolved_vcenter_host; + } + + /** + * The hostname of the vcenter. + * + * Generated from protobuf field string resolved_vcenter_host = 5; + * @param string $var + * @return $this + */ + public function setResolvedVcenterHost($var) + { + GPBUtil::checkString($var, True); + $this->resolved_vcenter_host = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceVmDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceVmDetails.php new file mode 100644 index 000000000000..313033f145c9 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceVmDetails.php @@ -0,0 +1,217 @@ +google.cloud.vmmigration.v1.VmwareSourceVmDetails + */ +class VmwareSourceVmDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The firmware type of the source VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareSourceVmDetails.Firmware firmware = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $firmware = 0; + /** + * Output only. The total size of the disks being migrated in bytes. + * + * Generated from protobuf field int64 committed_storage_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $committed_storage_bytes = 0; + /** + * Output only. The disks attached to the source VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmwareSourceVmDetails.VmwareDiskDetails disks = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $disks; + /** + * Output only. Information about VM capabilities needed for some Compute + * Engine features. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmCapabilities vm_capabilities_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $vm_capabilities_info = null; + /** + * Output only. The VM architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmArchitecture architecture = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $architecture = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $firmware + * Output only. The firmware type of the source VM. + * @type int|string $committed_storage_bytes + * Output only. The total size of the disks being migrated in bytes. + * @type array<\Google\Cloud\VMMigration\V1\VmwareSourceVmDetails\VmwareDiskDetails>|\Google\Protobuf\Internal\RepeatedField $disks + * Output only. The disks attached to the source VM. + * @type \Google\Cloud\VMMigration\V1\VmCapabilities $vm_capabilities_info + * Output only. Information about VM capabilities needed for some Compute + * Engine features. + * @type int $architecture + * Output only. The VM architecture. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The firmware type of the source VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareSourceVmDetails.Firmware firmware = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getFirmware() + { + return $this->firmware; + } + + /** + * Output only. The firmware type of the source VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareSourceVmDetails.Firmware firmware = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setFirmware($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\VmwareSourceVmDetails\Firmware::class); + $this->firmware = $var; + + return $this; + } + + /** + * Output only. The total size of the disks being migrated in bytes. + * + * Generated from protobuf field int64 committed_storage_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getCommittedStorageBytes() + { + return $this->committed_storage_bytes; + } + + /** + * Output only. The total size of the disks being migrated in bytes. + * + * Generated from protobuf field int64 committed_storage_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setCommittedStorageBytes($var) + { + GPBUtil::checkInt64($var); + $this->committed_storage_bytes = $var; + + return $this; + } + + /** + * Output only. The disks attached to the source VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmwareSourceVmDetails.VmwareDiskDetails disks = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDisks() + { + return $this->disks; + } + + /** + * Output only. The disks attached to the source VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.VmwareSourceVmDetails.VmwareDiskDetails disks = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\VmwareSourceVmDetails\VmwareDiskDetails>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDisks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\VmwareSourceVmDetails\VmwareDiskDetails::class); + $this->disks = $arr; + + return $this; + } + + /** + * Output only. Information about VM capabilities needed for some Compute + * Engine features. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmCapabilities vm_capabilities_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\VmCapabilities|null + */ + public function getVmCapabilitiesInfo() + { + return $this->vm_capabilities_info; + } + + public function hasVmCapabilitiesInfo() + { + return isset($this->vm_capabilities_info); + } + + public function clearVmCapabilitiesInfo() + { + unset($this->vm_capabilities_info); + } + + /** + * Output only. Information about VM capabilities needed for some Compute + * Engine features. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmCapabilities vm_capabilities_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\VmCapabilities $var + * @return $this + */ + public function setVmCapabilitiesInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmCapabilities::class); + $this->vm_capabilities_info = $var; + + return $this; + } + + /** + * Output only. The VM architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmArchitecture architecture = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getArchitecture() + { + return $this->architecture; + } + + /** + * Output only. The VM architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmArchitecture architecture = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setArchitecture($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\VmArchitecture::class); + $this->architecture = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceVmDetails/Firmware.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceVmDetails/Firmware.php new file mode 100644 index 000000000000..86ec4c0d0c34 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceVmDetails/Firmware.php @@ -0,0 +1,64 @@ +google.cloud.vmmigration.v1.VmwareSourceVmDetails.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\VmwareSourceVmDetails_Firmware::class); + diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceVmDetails/VmwareDiskDetails.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceVmDetails/VmwareDiskDetails.php new file mode 100644 index 000000000000..8e8ffdf594bc --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceVmDetails/VmwareDiskDetails.php @@ -0,0 +1,138 @@ +google.cloud.vmmigration.v1.VmwareSourceVmDetails.VmwareDiskDetails + */ +class VmwareDiskDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The ordinal number of the disk. + * + * Generated from protobuf field int32 disk_number = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $disk_number = 0; + /** + * Output only. Size in GB. + * + * Generated from protobuf field int64 size_gb = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $size_gb = 0; + /** + * Output only. The disk label. + * + * Generated from protobuf field string label = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $label = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $disk_number + * Output only. The ordinal number of the disk. + * @type int|string $size_gb + * Output only. Size in GB. + * @type string $label + * Output only. The disk label. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The ordinal number of the disk. + * + * Generated from protobuf field int32 disk_number = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getDiskNumber() + { + return $this->disk_number; + } + + /** + * Output only. The ordinal number of the disk. + * + * Generated from protobuf field int32 disk_number = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setDiskNumber($var) + { + GPBUtil::checkInt32($var); + $this->disk_number = $var; + + return $this; + } + + /** + * Output only. Size in GB. + * + * Generated from protobuf field int64 size_gb = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getSizeGb() + { + return $this->size_gb; + } + + /** + * Output only. Size in GB. + * + * Generated from protobuf field int64 size_gb = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setSizeGb($var) + { + GPBUtil::checkInt64($var); + $this->size_gb = $var; + + return $this; + } + + /** + * Output only. The disk label. + * + * Generated from protobuf field string label = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * Output only. The disk label. + * + * Generated from protobuf field string label = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VmwareDiskDetails::class, \Google\Cloud\VMMigration\V1\VmwareSourceVmDetails_VmwareDiskDetails::class); + 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..ac8e71353c47 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails.php @@ -0,0 +1,487 @@ +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; + /** + * Output only. The CPU architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.VmArchitecture architecture = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $architecture = 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. + * @type int $architecture + * Output only. The CPU architecture. + * } + */ + 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; + } + + /** + * Output only. The CPU architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.VmArchitecture architecture = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getArchitecture() + { + return $this->architecture; + } + + /** + * Output only. The CPU architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.VmArchitecture architecture = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setArchitecture($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\VmwareVmDetails\VmArchitecture::class); + $this->architecture = $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/VmwareVmDetails/VmArchitecture.php b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/VmArchitecture.php new file mode 100644 index 000000000000..a7e69e768cd3 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/VmArchitecture.php @@ -0,0 +1,64 @@ +google.cloud.vmmigration.v1.VmwareVmDetails.VmArchitecture + */ +class VmArchitecture +{ + /** + * The architecture is unknown. + * + * Generated from protobuf enum VM_ARCHITECTURE_UNSPECIFIED = 0; + */ + const VM_ARCHITECTURE_UNSPECIFIED = 0; + /** + * The architecture is one of the x86 architectures. + * + * Generated from protobuf enum VM_ARCHITECTURE_X86_FAMILY = 1; + */ + const VM_ARCHITECTURE_X86_FAMILY = 1; + /** + * The architecture is ARM64. + * + * Generated from protobuf enum VM_ARCHITECTURE_ARM64 = 2; + */ + const VM_ARCHITECTURE_ARM64 = 2; + + private static $valueToName = [ + self::VM_ARCHITECTURE_UNSPECIFIED => 'VM_ARCHITECTURE_UNSPECIFIED', + self::VM_ARCHITECTURE_X86_FAMILY => 'VM_ARCHITECTURE_X86_FAMILY', + self::VM_ARCHITECTURE_ARM64 => 'VM_ARCHITECTURE_ARM64', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no 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\VmwareVmDetails_VmArchitecture::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..5a96160d9454 --- /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..637b64dfccfd --- /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..8ff915868b0b --- /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/cancel_disk_migration_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_disk_migration_job.php new file mode 100644 index 000000000000..fc399447f18a --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_disk_migration_job.php @@ -0,0 +1,88 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->cancelDiskMigrationJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CancelDiskMigrationJobResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It 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::diskMigrationJobName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[DISK_MIGRATION_JOB]' + ); + + cancel_disk_migration_job_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_CancelDiskMigrationJob_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_image_import_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_image_import_job.php new file mode 100644 index 000000000000..afd9642a2069 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_image_import_job.php @@ -0,0 +1,88 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->cancelImageImportJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CancelImageImportJobResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It 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::imageImportJobName( + '[PROJECT]', + '[LOCATION]', + '[JOB]', + '[RESULT]' + ); + + cancel_image_import_job_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_CancelImageImportJob_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..07fb9fe8065a --- /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..112aedf9305b --- /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..fd49a34265e4 --- /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_disk_migration_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_disk_migration_job.php new file mode 100644 index 000000000000..2e9762ce397b --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_disk_migration_job.php @@ -0,0 +1,130 @@ +setZone($formattedDiskMigrationJobTargetDetailsTargetDiskZone) + ->setDiskType($diskMigrationJobTargetDetailsTargetDiskDiskType); + $diskMigrationJobTargetDetails = (new DiskMigrationJobTargetDetails()) + ->setTargetDisk($diskMigrationJobTargetDetailsTargetDisk) + ->setTargetProject($formattedDiskMigrationJobTargetDetailsTargetProject); + $diskMigrationJob = (new DiskMigrationJob()) + ->setTargetDetails($diskMigrationJobTargetDetails); + $request = (new CreateDiskMigrationJobRequest()) + ->setParent($formattedParent) + ->setDiskMigrationJobId($diskMigrationJobId) + ->setDiskMigrationJob($diskMigrationJob); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->createDiskMigrationJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DiskMigrationJob $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It 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]'); + $diskMigrationJobId = '[DISK_MIGRATION_JOB_ID]'; + $formattedDiskMigrationJobTargetDetailsTargetDiskZone = VmMigrationClient::locationName( + '[PROJECT]', + '[LOCATION]' + ); + $diskMigrationJobTargetDetailsTargetDiskDiskType = ComputeEngineDiskType::COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED; + $formattedDiskMigrationJobTargetDetailsTargetProject = VmMigrationClient::targetProjectName( + '[PROJECT]', + '[LOCATION]', + '[TARGET_PROJECT]' + ); + + create_disk_migration_job_sample( + $formattedParent, + $diskMigrationJobId, + $formattedDiskMigrationJobTargetDetailsTargetDiskZone, + $diskMigrationJobTargetDetailsTargetDiskDiskType, + $formattedDiskMigrationJobTargetDetailsTargetProject + ); +} +// [END vmmigration_v1_generated_VmMigration_CreateDiskMigrationJob_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..3006a32c3d9f --- /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_image_import.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_image_import.php new file mode 100644 index 000000000000..d6a24fb67479 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_image_import.php @@ -0,0 +1,91 @@ +setParent($formattedParent) + ->setImageImportId($imageImportId) + ->setImageImport($imageImport); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->createImageImport($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImageImport $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It 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]'); + $imageImportId = '[IMAGE_IMPORT_ID]'; + + create_image_import_sample($formattedParent, $imageImportId); +} +// [END vmmigration_v1_generated_VmMigration_CreateImageImport_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..fde4d8d5ebc9 --- /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..7de6c9f219ff --- /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..ab4a87c186cd --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_target_project.php @@ -0,0 +1,97 @@ +setProject($targetProjectProject); + $request = (new CreateTargetProjectRequest()) + ->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]'; + $targetProjectProject = '[PROJECT]'; + + create_target_project_sample($formattedParent, $targetProjectId, $targetProjectProject); +} +// [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..ffa84f253503 --- /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..9e88bc377809 --- /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_disk_migration_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_disk_migration_job.php new file mode 100644 index 000000000000..bbee4807c623 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_disk_migration_job.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->deleteDiskMigrationJob($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::diskMigrationJobName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[DISK_MIGRATION_JOB]' + ); + + delete_disk_migration_job_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_DeleteDiskMigrationJob_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..4adfe8b56533 --- /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_image_import.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_image_import.php new file mode 100644 index 000000000000..b5f38fe3ea45 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_image_import.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->deleteImageImport($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::imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); + + delete_image_import_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_DeleteImageImport_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..6c9989b20019 --- /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..151e33a858c6 --- /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..cd46935fb5be --- /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..40b57bceea89 --- /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/extend_migration.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/extend_migration.php new file mode 100644 index 000000000000..72d125747855 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/extend_migration.php @@ -0,0 +1,88 @@ +setMigratingVm($formattedMigratingVm); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->extendMigration($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ExtendMigrationResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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]' + ); + + extend_migration_sample($formattedMigratingVm); +} +// [END vmmigration_v1_generated_VmMigration_ExtendMigration_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..5512fd9bd4c1 --- /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/fetch_storage_inventory.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/fetch_storage_inventory.php new file mode 100644 index 000000000000..c5e9b8d77a15 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/fetch_storage_inventory.php @@ -0,0 +1,85 @@ +setSource($formattedSource) + ->setType($type); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->fetchStorageInventory($request); + + /** @var SourceStorageResource $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - 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]'); + $type = StorageType::STORAGE_TYPE_UNSPECIFIED; + + fetch_storage_inventory_sample($formattedSource, $type); +} +// [END vmmigration_v1_generated_VmMigration_FetchStorageInventory_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..6b0402be48ef --- /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..c80d5ffdd304 --- /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..83e35aec592d --- /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..361123c8495f --- /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_disk_migration_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_disk_migration_job.php new file mode 100644 index 000000000000..d365ee748488 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_disk_migration_job.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DiskMigrationJob $response */ + $response = $vmMigrationClient->getDiskMigrationJob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It 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::diskMigrationJobName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[DISK_MIGRATION_JOB]' + ); + + get_disk_migration_job_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetDiskMigrationJob_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..53c915ed667d --- /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_image_import.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_image_import.php new file mode 100644 index 000000000000..c3de45debba3 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_image_import.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ImageImport $response */ + $response = $vmMigrationClient->getImageImport($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It 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::imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); + + get_image_import_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetImageImport_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_image_import_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_image_import_job.php new file mode 100644 index 000000000000..293f28addad6 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_image_import_job.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ImageImportJob $response */ + $response = $vmMigrationClient->getImageImportJob($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It 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::imageImportJobName( + '[PROJECT]', + '[LOCATION]', + '[JOB]', + '[RESULT]' + ); + + get_image_import_job_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_GetImageImportJob_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..52d99b397f52 --- /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..c106af7b7bfd --- /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..8a98a9674f2a --- /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..cc7bef758257 --- /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..7651ead254c0 --- /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..21d4d911d13c --- /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..45b51a1dc151 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_clone_jobs.php @@ -0,0 +1,88 @@ +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..685e99958a2e --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_cutover_jobs.php @@ -0,0 +1,88 @@ +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..085978e55a24 --- /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_disk_migration_jobs.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_disk_migration_jobs.php new file mode 100644 index 000000000000..78169cc53d38 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_disk_migration_jobs.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listDiskMigrationJobs($request); + + /** @var DiskMigrationJob $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It 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]'); + + list_disk_migration_jobs_sample($formattedParent); +} +// [END vmmigration_v1_generated_VmMigration_ListDiskMigrationJobs_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..6dbbbb6c1974 --- /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_image_import_jobs.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_image_import_jobs.php new file mode 100644 index 000000000000..b244d70d2f48 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_image_import_jobs.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listImageImportJobs($request); + + /** @var ImageImportJob $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It 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::imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); + + list_image_import_jobs_sample($formattedParent); +} +// [END vmmigration_v1_generated_VmMigration_ListImageImportJobs_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_image_imports.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_image_imports.php new file mode 100644 index 000000000000..7fa2851ba5a9 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_image_imports.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $vmMigrationClient->listImageImports($request); + + /** @var ImageImport $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It 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]'); + + list_image_imports_sample($formattedParent); +} +// [END vmmigration_v1_generated_VmMigration_ListImageImports_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..87344babd960 --- /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..6d37ec241276 --- /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..9830ec51d9bd --- /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..3147e4db7d10 --- /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..ac607ae78b95 --- /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..945b374f0a3e --- /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..6f0eebc2346f --- /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..d72b4cb52785 --- /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..cbaa55c08591 --- /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/run_disk_migration_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/run_disk_migration_job.php new file mode 100644 index 000000000000..a53240b47cbd --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/run_disk_migration_job.php @@ -0,0 +1,88 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->runDiskMigrationJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var RunDiskMigrationJobResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It 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::diskMigrationJobName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[DISK_MIGRATION_JOB]' + ); + + run_disk_migration_job_sample($formattedName); +} +// [END vmmigration_v1_generated_VmMigration_RunDiskMigrationJob_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..a3d10a793d4b --- /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_disk_migration_job.php b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_disk_migration_job.php new file mode 100644 index 000000000000..6338320b64a8 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_disk_migration_job.php @@ -0,0 +1,116 @@ +setZone($formattedDiskMigrationJobTargetDetailsTargetDiskZone) + ->setDiskType($diskMigrationJobTargetDetailsTargetDiskDiskType); + $diskMigrationJobTargetDetails = (new DiskMigrationJobTargetDetails()) + ->setTargetDisk($diskMigrationJobTargetDetailsTargetDisk) + ->setTargetProject($formattedDiskMigrationJobTargetDetailsTargetProject); + $diskMigrationJob = (new DiskMigrationJob()) + ->setTargetDetails($diskMigrationJobTargetDetails); + $request = (new UpdateDiskMigrationJobRequest()) + ->setDiskMigrationJob($diskMigrationJob); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $vmMigrationClient->updateDiskMigrationJob($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DiskMigrationJob $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedDiskMigrationJobTargetDetailsTargetDiskZone = VmMigrationClient::locationName( + '[PROJECT]', + '[LOCATION]' + ); + $diskMigrationJobTargetDetailsTargetDiskDiskType = ComputeEngineDiskType::COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED; + $formattedDiskMigrationJobTargetDetailsTargetProject = VmMigrationClient::targetProjectName( + '[PROJECT]', + '[LOCATION]', + '[TARGET_PROJECT]' + ); + + update_disk_migration_job_sample( + $formattedDiskMigrationJobTargetDetailsTargetDiskZone, + $diskMigrationJobTargetDetailsTargetDiskDiskType, + $formattedDiskMigrationJobTargetDetailsTargetProject + ); +} +// [END vmmigration_v1_generated_VmMigration_UpdateDiskMigrationJob_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..173699beeacf --- /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..ff57c1dc109f --- /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..652c7e7171be --- /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..708db8c77fde --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_target_project.php @@ -0,0 +1,87 @@ +setProject($targetProjectProject); + $request = (new UpdateTargetProjectRequest()) + ->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()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $targetProjectProject = '[PROJECT]'; + + update_target_project_sample($targetProjectProject); +} +// [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..db3ea44cf6db --- /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..6fef1d9a3c3f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/src/V1/Client/VmMigrationClient.php @@ -0,0 +1,2437 @@ + addGroupMigrationAsync(AddGroupMigrationRequest $request, array $optionalArgs = []) + * @method PromiseInterface cancelCloneJobAsync(CancelCloneJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface cancelCutoverJobAsync(CancelCutoverJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface cancelDiskMigrationJobAsync(CancelDiskMigrationJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface cancelImageImportJobAsync(CancelImageImportJobRequest $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 createDiskMigrationJobAsync(CreateDiskMigrationJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface createGroupAsync(CreateGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface createImageImportAsync(CreateImageImportRequest $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 deleteDiskMigrationJobAsync(DeleteDiskMigrationJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteGroupAsync(DeleteGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteImageImportAsync(DeleteImageImportRequest $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 extendMigrationAsync(ExtendMigrationRequest $request, array $optionalArgs = []) + * @method PromiseInterface fetchInventoryAsync(FetchInventoryRequest $request, array $optionalArgs = []) + * @method PromiseInterface fetchStorageInventoryAsync(FetchStorageInventoryRequest $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 getDiskMigrationJobAsync(GetDiskMigrationJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface getGroupAsync(GetGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getImageImportAsync(GetImageImportRequest $request, array $optionalArgs = []) + * @method PromiseInterface getImageImportJobAsync(GetImageImportJobRequest $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 listDiskMigrationJobsAsync(ListDiskMigrationJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGroupsAsync(ListGroupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listImageImportJobsAsync(ListImageImportJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listImageImportsAsync(ListImageImportsRequest $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 runDiskMigrationJobAsync(RunDiskMigrationJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface startMigrationAsync(StartMigrationRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDiskMigrationJobAsync(UpdateDiskMigrationJobRequest $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 crypto_key + * resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $cryptoKey + * + * @return string The formatted crypto_key resource. + */ + public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string + { + return self::getPathTemplate('cryptoKey')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a 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 + * disk_migration_job resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $diskMigrationJob + * + * @return string The formatted disk_migration_job resource. + */ + public static function diskMigrationJobName(string $project, string $location, string $source, string $diskMigrationJob): string + { + return self::getPathTemplate('diskMigrationJob')->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'disk_migration_job' => $diskMigrationJob, + ]); + } + + /** + * 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 image + * resource. + * + * @param string $project + * @param string $image + * + * @return string The formatted image resource. + */ + public static function imageName(string $project, string $image): string + { + return self::getPathTemplate('image')->render([ + 'project' => $project, + 'image' => $image, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a image_import + * resource. + * + * @param string $project + * @param string $location + * @param string $job + * + * @return string The formatted image_import resource. + */ + public static function imageImportName(string $project, string $location, string $job): string + { + return self::getPathTemplate('imageImport')->render([ + 'project' => $project, + 'location' => $location, + 'job' => $job, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * image_import_job resource. + * + * @param string $project + * @param string $location + * @param string $job + * @param string $result + * + * @return string The formatted image_import_job resource. + */ + public static function imageImportJobName(string $project, string $location, string $job, string $result): string + { + return self::getPathTemplate('imageImportJob')->render([ + 'project' => $project, + 'location' => $location, + 'job' => $job, + 'result' => $result, + ]); + } + + /** + * 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 + * service_account resource. + * + * @param string $project + * @param string $serviceAccount + * + * @return string The formatted service_account resource. + */ + public static function serviceAccountName(string $project, string $serviceAccount): string + { + return self::getPathTemplate('serviceAccount')->render([ + 'project' => $project, + 'service_account' => $serviceAccount, + ]); + } + + /** + * 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} + * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} + * - cutoverJob: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job} + * - datacenterConnector: projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector} + * - diskMigrationJob: projects/{project}/locations/{location}/sources/{source}/diskMigrationJobs/{disk_migration_job} + * - group: projects/{project}/locations/{location}/groups/{group} + * - image: projects/{project}/global/images/{image} + * - imageImport: projects/{project}/locations/{location}/imageImports/{job} + * - imageImportJob: projects/{project}/locations/{location}/imageImports/{job}/imageImportJobs/{result} + * - 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} + * - serviceAccount: projects/{project}/serviceAccounts/{service_account} + * - 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. + * *Important*: If you accept a credential configuration (credential + * JSON/File/Stream) from an external source for authentication to Google Cloud + * Platform, you must validate it before providing it to any Google API or library. + * Providing an unvalidated credential configuration to Google APIs can compromise + * the security of your systems and data. For more information {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * } + * + * @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(); + } + + /** + * Cancels the disk migration job. + * + * The async variant is {@see VmMigrationClient::cancelDiskMigrationJobAsync()} . + * + * @example samples/V1/VmMigrationClient/cancel_disk_migration_job.php + * + * @param CancelDiskMigrationJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function cancelDiskMigrationJob(CancelDiskMigrationJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CancelDiskMigrationJob', $request, $callOptions)->wait(); + } + + /** + * Initiates the cancellation of a running clone job. + * + * The async variant is {@see VmMigrationClient::cancelImageImportJobAsync()} . + * + * @example samples/V1/VmMigrationClient/cancel_image_import_job.php + * + * @param CancelImageImportJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function cancelImageImportJob(CancelImageImportJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CancelImageImportJob', $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 disk migration job in a given Source. + * + * The async variant is {@see VmMigrationClient::createDiskMigrationJobAsync()} . + * + * @example samples/V1/VmMigrationClient/create_disk_migration_job.php + * + * @param CreateDiskMigrationJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createDiskMigrationJob(CreateDiskMigrationJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateDiskMigrationJob', $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 ImageImport in a given project. + * + * The async variant is {@see VmMigrationClient::createImageImportAsync()} . + * + * @example samples/V1/VmMigrationClient/create_image_import.php + * + * @param CreateImageImportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createImageImport(CreateImageImportRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateImageImport', $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 DiskMigrationJob. + * + * The async variant is {@see VmMigrationClient::deleteDiskMigrationJobAsync()} . + * + * @example samples/V1/VmMigrationClient/delete_disk_migration_job.php + * + * @param DeleteDiskMigrationJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteDiskMigrationJob(DeleteDiskMigrationJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteDiskMigrationJob', $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 ImageImport. + * + * The async variant is {@see VmMigrationClient::deleteImageImportAsync()} . + * + * @example samples/V1/VmMigrationClient/delete_image_import.php + * + * @param DeleteImageImportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteImageImport(DeleteImageImportRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteImageImport', $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(); + } + + /** + * Extend the migrating VM time to live. + * + * The async variant is {@see VmMigrationClient::extendMigrationAsync()} . + * + * @example samples/V1/VmMigrationClient/extend_migration.php + * + * @param ExtendMigrationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function extendMigration(ExtendMigrationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ExtendMigration', $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(); + } + + /** + * List remote source's inventory of storage resources. + * The remote source is another cloud vendor (e.g. AWS, Azure). + * The inventory describes the list of existing storage resources in that + * source. Note that this operation lists the resources on the remote source, + * as opposed to listing the MigratingVms resources in the vmmigration + * service. + * + * The async variant is {@see VmMigrationClient::fetchStorageInventoryAsync()} . + * + * @example samples/V1/VmMigrationClient/fetch_storage_inventory.php + * + * @param FetchStorageInventoryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function fetchStorageInventory(FetchStorageInventoryRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('FetchStorageInventory', $request, $callOptions); + } + + /** + * 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 DiskMigrationJob. + * + * The async variant is {@see VmMigrationClient::getDiskMigrationJobAsync()} . + * + * @example samples/V1/VmMigrationClient/get_disk_migration_job.php + * + * @param GetDiskMigrationJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DiskMigrationJob + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDiskMigrationJob(GetDiskMigrationJobRequest $request, array $callOptions = []): DiskMigrationJob + { + return $this->startApiCall('GetDiskMigrationJob', $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 ImageImport. + * + * The async variant is {@see VmMigrationClient::getImageImportAsync()} . + * + * @example samples/V1/VmMigrationClient/get_image_import.php + * + * @param GetImageImportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ImageImport + * + * @throws ApiException Thrown if the API call fails. + */ + public function getImageImport(GetImageImportRequest $request, array $callOptions = []): ImageImport + { + return $this->startApiCall('GetImageImport', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single ImageImportJob. + * + * The async variant is {@see VmMigrationClient::getImageImportJobAsync()} . + * + * @example samples/V1/VmMigrationClient/get_image_import_job.php + * + * @param GetImageImportJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ImageImportJob + * + * @throws ApiException Thrown if the API call fails. + */ + public function getImageImportJob(GetImageImportJobRequest $request, array $callOptions = []): ImageImportJob + { + return $this->startApiCall('GetImageImportJob', $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 the CloneJobs of a migrating VM. Only 25 most recent CloneJobs are + * listed. + * + * 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 the CutoverJobs of a migrating VM. Only 25 most recent CutoverJobs + * are listed. + * + * 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 DiskMigrationJobs in a given Source. + * + * The async variant is {@see VmMigrationClient::listDiskMigrationJobsAsync()} . + * + * @example samples/V1/VmMigrationClient/list_disk_migration_jobs.php + * + * @param ListDiskMigrationJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listDiskMigrationJobs(ListDiskMigrationJobsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDiskMigrationJobs', $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 ImageImportJobs in a given project. + * + * The async variant is {@see VmMigrationClient::listImageImportJobsAsync()} . + * + * @example samples/V1/VmMigrationClient/list_image_import_jobs.php + * + * @param ListImageImportJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listImageImportJobs(ListImageImportJobsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListImageImportJobs', $request, $callOptions); + } + + /** + * Lists ImageImports in a given project. + * + * The async variant is {@see VmMigrationClient::listImageImportsAsync()} . + * + * @example samples/V1/VmMigrationClient/list_image_imports.php + * + * @param ListImageImportsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listImageImports(ListImageImportsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListImageImports', $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(); + } + + /** + * Runs the disk migration job. + * + * The async variant is {@see VmMigrationClient::runDiskMigrationJobAsync()} . + * + * @example samples/V1/VmMigrationClient/run_disk_migration_job.php + * + * @param RunDiskMigrationJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function runDiskMigrationJob(RunDiskMigrationJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RunDiskMigrationJob', $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 DiskMigrationJob. + * + * The async variant is {@see VmMigrationClient::updateDiskMigrationJobAsync()} . + * + * @example samples/V1/VmMigrationClient/update_disk_migration_job.php + * + * @param UpdateDiskMigrationJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateDiskMigrationJob(UpdateDiskMigrationJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateDiskMigrationJob', $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..079a61db5e12 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/src/V1/gapic_metadata.json @@ -0,0 +1,338 @@ +{ + "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" + ] + }, + "CancelDiskMigrationJob": { + "methods": [ + "cancelDiskMigrationJob" + ] + }, + "CancelImageImportJob": { + "methods": [ + "cancelImageImportJob" + ] + }, + "CreateCloneJob": { + "methods": [ + "createCloneJob" + ] + }, + "CreateCutoverJob": { + "methods": [ + "createCutoverJob" + ] + }, + "CreateDatacenterConnector": { + "methods": [ + "createDatacenterConnector" + ] + }, + "CreateDiskMigrationJob": { + "methods": [ + "createDiskMigrationJob" + ] + }, + "CreateGroup": { + "methods": [ + "createGroup" + ] + }, + "CreateImageImport": { + "methods": [ + "createImageImport" + ] + }, + "CreateMigratingVm": { + "methods": [ + "createMigratingVm" + ] + }, + "CreateSource": { + "methods": [ + "createSource" + ] + }, + "CreateTargetProject": { + "methods": [ + "createTargetProject" + ] + }, + "CreateUtilizationReport": { + "methods": [ + "createUtilizationReport" + ] + }, + "DeleteDatacenterConnector": { + "methods": [ + "deleteDatacenterConnector" + ] + }, + "DeleteDiskMigrationJob": { + "methods": [ + "deleteDiskMigrationJob" + ] + }, + "DeleteGroup": { + "methods": [ + "deleteGroup" + ] + }, + "DeleteImageImport": { + "methods": [ + "deleteImageImport" + ] + }, + "DeleteMigratingVm": { + "methods": [ + "deleteMigratingVm" + ] + }, + "DeleteSource": { + "methods": [ + "deleteSource" + ] + }, + "DeleteTargetProject": { + "methods": [ + "deleteTargetProject" + ] + }, + "DeleteUtilizationReport": { + "methods": [ + "deleteUtilizationReport" + ] + }, + "ExtendMigration": { + "methods": [ + "extendMigration" + ] + }, + "FetchInventory": { + "methods": [ + "fetchInventory" + ] + }, + "FetchStorageInventory": { + "methods": [ + "fetchStorageInventory" + ] + }, + "FinalizeMigration": { + "methods": [ + "finalizeMigration" + ] + }, + "GetCloneJob": { + "methods": [ + "getCloneJob" + ] + }, + "GetCutoverJob": { + "methods": [ + "getCutoverJob" + ] + }, + "GetDatacenterConnector": { + "methods": [ + "getDatacenterConnector" + ] + }, + "GetDiskMigrationJob": { + "methods": [ + "getDiskMigrationJob" + ] + }, + "GetGroup": { + "methods": [ + "getGroup" + ] + }, + "GetImageImport": { + "methods": [ + "getImageImport" + ] + }, + "GetImageImportJob": { + "methods": [ + "getImageImportJob" + ] + }, + "GetMigratingVm": { + "methods": [ + "getMigratingVm" + ] + }, + "GetReplicationCycle": { + "methods": [ + "getReplicationCycle" + ] + }, + "GetSource": { + "methods": [ + "getSource" + ] + }, + "GetTargetProject": { + "methods": [ + "getTargetProject" + ] + }, + "GetUtilizationReport": { + "methods": [ + "getUtilizationReport" + ] + }, + "ListCloneJobs": { + "methods": [ + "listCloneJobs" + ] + }, + "ListCutoverJobs": { + "methods": [ + "listCutoverJobs" + ] + }, + "ListDatacenterConnectors": { + "methods": [ + "listDatacenterConnectors" + ] + }, + "ListDiskMigrationJobs": { + "methods": [ + "listDiskMigrationJobs" + ] + }, + "ListGroups": { + "methods": [ + "listGroups" + ] + }, + "ListImageImportJobs": { + "methods": [ + "listImageImportJobs" + ] + }, + "ListImageImports": { + "methods": [ + "listImageImports" + ] + }, + "ListMigratingVms": { + "methods": [ + "listMigratingVms" + ] + }, + "ListReplicationCycles": { + "methods": [ + "listReplicationCycles" + ] + }, + "ListSources": { + "methods": [ + "listSources" + ] + }, + "ListTargetProjects": { + "methods": [ + "listTargetProjects" + ] + }, + "ListUtilizationReports": { + "methods": [ + "listUtilizationReports" + ] + }, + "PauseMigration": { + "methods": [ + "pauseMigration" + ] + }, + "RemoveGroupMigration": { + "methods": [ + "removeGroupMigration" + ] + }, + "ResumeMigration": { + "methods": [ + "resumeMigration" + ] + }, + "RunDiskMigrationJob": { + "methods": [ + "runDiskMigrationJob" + ] + }, + "StartMigration": { + "methods": [ + "startMigration" + ] + }, + "UpdateDiskMigrationJob": { + "methods": [ + "updateDiskMigrationJob" + ] + }, + "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..9cb301193296 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_client_config.json @@ -0,0 +1,372 @@ +{ + "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" + }, + "CancelDiskMigrationJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CancelImageImportJob": { + "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" + }, + "CreateDiskMigrationJob": { + "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" + }, + "CreateImageImport": { + "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" + }, + "DeleteDiskMigrationJob": { + "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" + }, + "DeleteImageImport": { + "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" + }, + "ExtendMigration": { + "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" + }, + "FetchStorageInventory": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_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" + }, + "GetDiskMigrationJob": { + "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" + }, + "GetImageImport": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetImageImportJob": { + "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" + }, + "ListDiskMigrationJobs": { + "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" + }, + "ListImageImportJobs": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListImageImports": { + "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" + }, + "RunDiskMigrationJob": { + "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" + }, + "UpdateDiskMigrationJob": { + "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..dbd8632aed89 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_descriptor_config.php @@ -0,0 +1,1185 @@ + [ + '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', + ], + ], + ], + ], + 'CancelDiskMigrationJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CancelDiskMigrationJobResponse', + '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', + ], + ], + ], + ], + 'CancelImageImportJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CancelImageImportJobResponse', + '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', + ], + ], + ], + ], + 'CreateDiskMigrationJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\DiskMigrationJob', + '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', + ], + ], + ], + ], + 'CreateImageImport' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\ImageImport', + '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', + ], + ], + ], + ], + 'DeleteDiskMigrationJob' => [ + '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', + ], + ], + ], + ], + 'DeleteImageImport' => [ + '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', + ], + ], + ], + ], + 'ExtendMigration' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\ExtendMigrationResponse', + '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', + ], + ], + ], + ], + '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', + ], + ], + ], + ], + 'RunDiskMigrationJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\RunDiskMigrationJobResponse', + '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', + ], + ], + ], + ], + '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', + ], + ], + ], + ], + 'UpdateDiskMigrationJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\DiskMigrationJob', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'disk_migration_job.name', + 'fieldAccessors' => [ + 'getDiskMigrationJob', + 'getName', + ], + ], + ], + ], + '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', + ], + ], + ], + ], + 'FetchStorageInventory' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getResources', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\FetchStorageInventoryResponse', + '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', + ], + ], + ], + ], + 'GetDiskMigrationJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\DiskMigrationJob', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\Group', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetImageImport' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ImageImport', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetImageImportJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ImageImportJob', + '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', + ], + ], + ], + ], + 'ListDiskMigrationJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDiskMigrationJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListDiskMigrationJobsResponse', + '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', + ], + ], + ], + ], + 'ListImageImportJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getImageImportJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListImageImportJobsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListImageImports' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getImageImports', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListImageImportsResponse', + '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}', + 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', + 'cutoverJob' => 'projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job}', + 'datacenterConnector' => 'projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector}', + 'diskMigrationJob' => 'projects/{project}/locations/{location}/sources/{source}/diskMigrationJobs/{disk_migration_job}', + 'group' => 'projects/{project}/locations/{location}/groups/{group}', + 'image' => 'projects/{project}/global/images/{image}', + 'imageImport' => 'projects/{project}/locations/{location}/imageImports/{job}', + 'imageImportJob' => 'projects/{project}/locations/{location}/imageImports/{job}/imageImportJobs/{result}', + '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}', + 'serviceAccount' => 'projects/{project}/serviceAccounts/{service_account}', + '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..db1565a10ed2 --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_rest_client_config.php @@ -0,0 +1,872 @@ + [ + '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', + ], + ], + ], + ], + 'CancelDiskMigrationJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/diskMigrationJobs/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CancelImageImportJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/imageImports/*/imageImportJobs/*}: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', + ], + ], + 'CreateDiskMigrationJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/diskMigrationJobs', + 'body' => 'disk_migration_job', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'disk_migration_job_id', + ], + ], + 'CreateGroup' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/groups', + 'body' => 'group', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'group_id', + ], + ], + 'CreateImageImport' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/imageImports', + 'body' => 'image_import', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'image_import_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', + ], + ], + ], + ], + 'DeleteDiskMigrationJob' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/diskMigrationJobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteGroup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/groups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteImageImport' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/imageImports/*}', + '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', + ], + ], + ], + ], + 'ExtendMigration' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:extendMigration', + 'body' => '*', + 'placeholders' => [ + 'migrating_vm' => [ + 'getters' => [ + 'getMigratingVm', + ], + ], + ], + ], + 'FetchInventory' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{source=projects/*/locations/*/sources/*}:fetchInventory', + 'placeholders' => [ + 'source' => [ + 'getters' => [ + 'getSource', + ], + ], + ], + ], + 'FetchStorageInventory' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{source=projects/*/locations/*/sources/*}:fetchStorageInventory', + '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', + ], + ], + ], + ], + 'GetDiskMigrationJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/diskMigrationJobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/groups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetImageImport' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/imageImports/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetImageImportJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/imageImports/*/imageImportJobs/*}', + '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', + ], + ], + 'ListDiskMigrationJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/diskMigrationJobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListGroups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/groups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'page_token', + ], + ], + 'ListImageImportJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/imageImports/*}/imageImportJobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListImageImports' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/imageImports', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + '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', + ], + ], + ], + ], + 'RunDiskMigrationJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/diskMigrationJobs/*}:run', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'StartMigration' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:startMigration', + 'body' => '*', + 'placeholders' => [ + 'migrating_vm' => [ + 'getters' => [ + 'getMigratingVm', + ], + ], + ], + ], + 'UpdateDiskMigrationJob' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{disk_migration_job.name=projects/*/locations/*/sources/*/diskMigrationJobs/*}', + 'body' => 'disk_migration_job', + 'placeholders' => [ + 'disk_migration_job.name' => [ + 'getters' => [ + 'getDiskMigrationJob', + 'getName', + ], + ], + ], + ], + '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..7d7e69f67e4f --- /dev/null +++ b/owl-bot-staging/VmMigration/v1/tests/Unit/V1/Client/VmMigrationClientTest.php @@ -0,0 +1,6847 @@ +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 cancelDiskMigrationJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelDiskMigrationJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new CancelDiskMigrationJobResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/cancelDiskMigrationJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->diskMigrationJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DISK_MIGRATION_JOB]'); + $request = (new CancelDiskMigrationJobRequest()) + ->setName($formattedName); + $response = $gapicClient->cancelDiskMigrationJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->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/CancelDiskMigrationJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelDiskMigrationJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cancelDiskMigrationJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelDiskMigrationJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->diskMigrationJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DISK_MIGRATION_JOB]'); + $request = (new CancelDiskMigrationJobRequest()) + ->setName($formattedName); + $response = $gapicClient->cancelDiskMigrationJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelDiskMigrationJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cancelImageImportJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelImageImportJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new CancelImageImportJobResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/cancelImageImportJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->imageImportJobName('[PROJECT]', '[LOCATION]', '[JOB]', '[RESULT]'); + $request = (new CancelImageImportJobRequest()) + ->setName($formattedName); + $response = $gapicClient->cancelImageImportJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->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/CancelImageImportJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelImageImportJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cancelImageImportJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelImageImportJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->imageImportJobName('[PROJECT]', '[LOCATION]', '[JOB]', '[RESULT]'); + $request = (new CancelImageImportJobRequest()) + ->setName($formattedName); + $response = $gapicClient->cancelImageImportJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelImageImportJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->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 createDiskMigrationJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createDiskMigrationJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new DiskMigrationJob(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDiskMigrationJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $diskMigrationJobId = 'diskMigrationJobId1115031760'; + $diskMigrationJob = new DiskMigrationJob(); + $diskMigrationJobTargetDetails = new DiskMigrationJobTargetDetails(); + $targetDetailsTargetProject = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + $diskMigrationJobTargetDetails->setTargetProject($targetDetailsTargetProject); + $targetDetailsTargetDisk = new ComputeEngineDisk(); + $targetDiskZone = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $targetDetailsTargetDisk->setZone($targetDiskZone); + $targetDiskDiskType = ComputeEngineDiskType::COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED; + $targetDetailsTargetDisk->setDiskType($targetDiskDiskType); + $diskMigrationJobTargetDetails->setTargetDisk($targetDetailsTargetDisk); + $diskMigrationJob->setTargetDetails($diskMigrationJobTargetDetails); + $request = (new CreateDiskMigrationJobRequest()) + ->setParent($formattedParent) + ->setDiskMigrationJobId($diskMigrationJobId) + ->setDiskMigrationJob($diskMigrationJob); + $response = $gapicClient->createDiskMigrationJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->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/CreateDiskMigrationJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDiskMigrationJobId(); + $this->assertProtobufEquals($diskMigrationJobId, $actualValue); + $actualValue = $actualApiRequestObject->getDiskMigrationJob(); + $this->assertProtobufEquals($diskMigrationJob, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDiskMigrationJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createDiskMigrationJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createDiskMigrationJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $diskMigrationJobId = 'diskMigrationJobId1115031760'; + $diskMigrationJob = new DiskMigrationJob(); + $diskMigrationJobTargetDetails = new DiskMigrationJobTargetDetails(); + $targetDetailsTargetProject = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + $diskMigrationJobTargetDetails->setTargetProject($targetDetailsTargetProject); + $targetDetailsTargetDisk = new ComputeEngineDisk(); + $targetDiskZone = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $targetDetailsTargetDisk->setZone($targetDiskZone); + $targetDiskDiskType = ComputeEngineDiskType::COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED; + $targetDetailsTargetDisk->setDiskType($targetDiskDiskType); + $diskMigrationJobTargetDetails->setTargetDisk($targetDetailsTargetDisk); + $diskMigrationJob->setTargetDetails($diskMigrationJobTargetDetails); + $request = (new CreateDiskMigrationJobRequest()) + ->setParent($formattedParent) + ->setDiskMigrationJobId($diskMigrationJobId) + ->setDiskMigrationJob($diskMigrationJob); + $response = $gapicClient->createDiskMigrationJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDiskMigrationJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->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 createImageImportTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createImageImportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $cloudStorageUri = 'cloudStorageUri1921455774'; + $name = 'name3373707'; + $expectedResponse = new ImageImport(); + $expectedResponse->setCloudStorageUri($cloudStorageUri); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createImageImportTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $imageImportId = 'imageImportId-677769711'; + $imageImport = new ImageImport(); + $request = (new CreateImageImportRequest()) + ->setParent($formattedParent) + ->setImageImportId($imageImportId) + ->setImageImport($imageImport); + $response = $gapicClient->createImageImport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->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/CreateImageImport', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getImageImportId(); + $this->assertProtobufEquals($imageImportId, $actualValue); + $actualValue = $actualApiRequestObject->getImageImport(); + $this->assertProtobufEquals($imageImport, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createImageImportTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createImageImportExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createImageImportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $imageImportId = 'imageImportId-677769711'; + $imageImport = new ImageImport(); + $request = (new CreateImageImportRequest()) + ->setParent($formattedParent) + ->setImageImportId($imageImportId) + ->setImageImport($imageImport); + $response = $gapicClient->createImageImport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createImageImportTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->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(); + $targetProjectProject = 'targetProjectProject2026784177'; + $targetProject->setProject($targetProjectProject); + $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(); + $targetProjectProject = 'targetProjectProject2026784177'; + $targetProject->setProject($targetProjectProject); + $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 deleteDiskMigrationJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteDiskMigrationJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteDiskMigrationJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->diskMigrationJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DISK_MIGRATION_JOB]'); + $request = (new DeleteDiskMigrationJobRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDiskMigrationJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->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/DeleteDiskMigrationJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDiskMigrationJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteDiskMigrationJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteDiskMigrationJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->diskMigrationJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DISK_MIGRATION_JOB]'); + $request = (new DeleteDiskMigrationJobRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDiskMigrationJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDiskMigrationJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->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 deleteImageImportTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteImageImportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteImageImportTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new DeleteImageImportRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteImageImport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->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/DeleteImageImport', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteImageImportTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteImageImportExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteImageImportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new DeleteImageImportRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteImageImport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteImageImportTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->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 extendMigrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/extendMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ExtendMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/extendMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new ExtendMigrationRequest()) + ->setMigratingVm($formattedMigratingVm); + $response = $gapicClient->extendMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->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/ExtendMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMigratingVm(); + $this->assertProtobufEquals($formattedMigratingVm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/extendMigrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function extendMigrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/extendMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ExtendMigrationRequest()) + ->setMigratingVm($formattedMigratingVm); + $response = $gapicClient->extendMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/extendMigrationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->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 fetchStorageInventoryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $resourcesElement = new SourceStorageResource(); + $resources = [ + $resourcesElement, + ]; + $expectedResponse = new FetchStorageInventoryResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setResources($resources); + $transport->addResponse($expectedResponse); + // Mock request + $formattedSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $type = StorageType::STORAGE_TYPE_UNSPECIFIED; + $request = (new FetchStorageInventoryRequest()) + ->setSource($formattedSource) + ->setType($type); + $response = $gapicClient->fetchStorageInventory($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResources()[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/FetchStorageInventory', $actualFuncCall); + $actualValue = $actualRequestObject->getSource(); + $this->assertProtobufEquals($formattedSource, $actualValue); + $actualValue = $actualRequestObject->getType(); + $this->assertProtobufEquals($type, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function fetchStorageInventoryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $type = StorageType::STORAGE_TYPE_UNSPECIFIED; + $request = (new FetchStorageInventoryRequest()) + ->setSource($formattedSource) + ->setType($type); + try { + $gapicClient->fetchStorageInventory($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 getDiskMigrationJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new DiskMigrationJob(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->diskMigrationJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DISK_MIGRATION_JOB]'); + $request = (new GetDiskMigrationJobRequest()) + ->setName($formattedName); + $response = $gapicClient->getDiskMigrationJob($request); + $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/GetDiskMigrationJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDiskMigrationJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->diskMigrationJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DISK_MIGRATION_JOB]'); + $request = (new GetDiskMigrationJobRequest()) + ->setName($formattedName); + try { + $gapicClient->getDiskMigrationJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 getImageImportTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $cloudStorageUri = 'cloudStorageUri1921455774'; + $name2 = 'name2-1052831874'; + $expectedResponse = new ImageImport(); + $expectedResponse->setCloudStorageUri($cloudStorageUri); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new GetImageImportRequest()) + ->setName($formattedName); + $response = $gapicClient->getImageImport($request); + $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/GetImageImport', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getImageImportExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new GetImageImportRequest()) + ->setName($formattedName); + try { + $gapicClient->getImageImport($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getImageImportJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $cloudStorageUri = 'cloudStorageUri1921455774'; + $name2 = 'name2-1052831874'; + $expectedResponse = new ImageImportJob(); + $expectedResponse->setCloudStorageUri($cloudStorageUri); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->imageImportJobName('[PROJECT]', '[LOCATION]', '[JOB]', '[RESULT]'); + $request = (new GetImageImportJobRequest()) + ->setName($formattedName); + $response = $gapicClient->getImageImportJob($request); + $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/GetImageImportJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getImageImportJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->imageImportJobName('[PROJECT]', '[LOCATION]', '[JOB]', '[RESULT]'); + $request = (new GetImageImportJobRequest()) + ->setName($formattedName); + try { + $gapicClient->getImageImportJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 listDiskMigrationJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $diskMigrationJobsElement = new DiskMigrationJob(); + $diskMigrationJobs = [ + $diskMigrationJobsElement, + ]; + $expectedResponse = new ListDiskMigrationJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDiskMigrationJobs($diskMigrationJobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new ListDiskMigrationJobsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDiskMigrationJobs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDiskMigrationJobs()[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/ListDiskMigrationJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDiskMigrationJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = 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]'); + $request = (new ListDiskMigrationJobsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDiskMigrationJobs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 listImageImportJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $imageImportJobsElement = new ImageImportJob(); + $imageImportJobs = [ + $imageImportJobsElement, + ]; + $expectedResponse = new ListImageImportJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setImageImportJobs($imageImportJobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new ListImageImportJobsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listImageImportJobs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getImageImportJobs()[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/ListImageImportJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listImageImportJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new ListImageImportJobsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listImageImportJobs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listImageImportsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $imageImportsElement = new ImageImport(); + $imageImports = [ + $imageImportsElement, + ]; + $expectedResponse = new ListImageImportsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setImageImports($imageImports); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListImageImportsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listImageImports($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getImageImports()[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/ListImageImports', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listImageImportsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = 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 ListImageImportsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listImageImports($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 runDiskMigrationJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/runDiskMigrationJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new RunDiskMigrationJobResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/runDiskMigrationJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->diskMigrationJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DISK_MIGRATION_JOB]'); + $request = (new RunDiskMigrationJobRequest()) + ->setName($formattedName); + $response = $gapicClient->runDiskMigrationJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->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/RunDiskMigrationJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runDiskMigrationJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function runDiskMigrationJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/runDiskMigrationJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->diskMigrationJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DISK_MIGRATION_JOB]'); + $request = (new RunDiskMigrationJobRequest()) + ->setName($formattedName); + $response = $gapicClient->runDiskMigrationJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runDiskMigrationJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->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 updateDiskMigrationJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateDiskMigrationJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new DiskMigrationJob(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateDiskMigrationJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $diskMigrationJob = new DiskMigrationJob(); + $diskMigrationJobTargetDetails = new DiskMigrationJobTargetDetails(); + $targetDetailsTargetProject = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + $diskMigrationJobTargetDetails->setTargetProject($targetDetailsTargetProject); + $targetDetailsTargetDisk = new ComputeEngineDisk(); + $targetDiskZone = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $targetDetailsTargetDisk->setZone($targetDiskZone); + $targetDiskDiskType = ComputeEngineDiskType::COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED; + $targetDetailsTargetDisk->setDiskType($targetDiskDiskType); + $diskMigrationJobTargetDetails->setTargetDisk($targetDetailsTargetDisk); + $diskMigrationJob->setTargetDetails($diskMigrationJobTargetDetails); + $request = (new UpdateDiskMigrationJobRequest()) + ->setDiskMigrationJob($diskMigrationJob); + $response = $gapicClient->updateDiskMigrationJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->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/UpdateDiskMigrationJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getDiskMigrationJob(); + $this->assertProtobufEquals($diskMigrationJob, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDiskMigrationJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateDiskMigrationJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateDiskMigrationJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $diskMigrationJob = new DiskMigrationJob(); + $diskMigrationJobTargetDetails = new DiskMigrationJobTargetDetails(); + $targetDetailsTargetProject = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + $diskMigrationJobTargetDetails->setTargetProject($targetDetailsTargetProject); + $targetDetailsTargetDisk = new ComputeEngineDisk(); + $targetDiskZone = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $targetDetailsTargetDisk->setZone($targetDiskZone); + $targetDiskDiskType = ComputeEngineDiskType::COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED; + $targetDetailsTargetDisk->setDiskType($targetDiskDiskType); + $diskMigrationJobTargetDetails->setTargetDisk($targetDetailsTargetDisk); + $diskMigrationJob->setTargetDetails($diskMigrationJobTargetDetails); + $request = (new UpdateDiskMigrationJobRequest()) + ->setDiskMigrationJob($diskMigrationJob); + $response = $gapicClient->updateDiskMigrationJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDiskMigrationJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->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(); + $targetProjectProject = 'targetProjectProject2026784177'; + $targetProject->setProject($targetProjectProject); + $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(); + $targetProjectProject = 'targetProjectProject2026784177'; + $targetProject->setProject($targetProjectProject); + $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()); + } +} From a6b37b0115e06b3f94bcb12c7d251cb7a26c7f08 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 4 Sep 2025 23:25:00 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- VmMigration/metadata/V1/Vmmigration.php | Bin 37746 -> 62065 bytes .../cancel_disk_migration_job.php | 0 .../cancel_image_import_job.php | 0 .../create_disk_migration_job.php | 0 .../VmMigrationClient/create_image_import.php | 0 .../create_target_project.php | 20 +- .../delete_disk_migration_job.php | 0 .../VmMigrationClient/delete_image_import.php | 0 .../V1/VmMigrationClient/extend_migration.php | 0 .../fetch_storage_inventory.php | 0 .../get_disk_migration_job.php | 0 .../V1/VmMigrationClient/get_image_import.php | 0 .../get_image_import_job.php | 0 .../V1/VmMigrationClient/list_clone_jobs.php | 3 +- .../VmMigrationClient/list_cutover_jobs.php | 3 +- .../list_disk_migration_jobs.php | 0 .../list_image_import_jobs.php | 0 .../VmMigrationClient/list_image_imports.php | 0 .../run_disk_migration_job.php | 0 .../update_disk_migration_job.php | 0 .../update_target_project.php | 27 +- VmMigration/src/V1/AvailableUpdates.php | 2 +- .../AwsSourceDetails/AccessKeyCredentials.php | 42 + VmMigration/src/V1/AwsSourceDetails/Tag.php | 28 +- .../src}/V1/AwsSourceDiskDetails.php | 0 .../src}/V1/AwsSourceDiskDetails/Type.php | 2 - VmMigration/src/V1/AwsSourceVmDetails.php | 144 +- .../V1/AwsSourceVmDetails/AwsDiskDetails.php | 2 - VmMigration/src/V1/AwsVmDetails.php | 46 +- .../src}/V1/AzureSourceDetails.php | 0 .../ClientSecretCredentials.php | 2 - .../src}/V1/AzureSourceDetails/State.php | 2 - .../src}/V1/AzureSourceVmDetails.php | 0 .../AzureSourceVmDetails/AzureDiskDetails.php | 2 - .../src}/V1/AzureSourceVmDetails/Firmware.php | 2 - .../src}/V1/AzureVmDetails.php | 0 .../src}/V1/AzureVmDetails/BootOption.php | 2 - .../src}/V1/AzureVmDetails/Disk.php | 2 - .../src}/V1/AzureVmDetails/OSDescription.php | 2 - .../src}/V1/AzureVmDetails/OSDisk.php | 2 - .../src}/V1/AzureVmDetails/PowerState.php | 2 - .../src}/V1/AzureVmDetails/VmArchitecture.php | 2 - .../src}/V1/AzureVmsDetails.php | 0 .../src}/V1/BootConversion.php | 0 .../src}/V1/BootDiskDefaults.php | 0 .../V1/BootDiskDefaults/DiskImageDefaults.php | 2 - .../src}/V1/CancelDiskMigrationJobRequest.php | 0 .../V1/CancelDiskMigrationJobResponse.php | 0 .../src}/V1/CancelImageImportJobRequest.php | 0 .../src}/V1/CancelImageImportJobResponse.php | 0 .../src/V1/Client/VmMigrationClient.php | 602 +- VmMigration/src/V1/CloneJob.php | 33 + .../src}/V1/ComputeEngineDisk.php | 0 VmMigration/src/V1/ComputeEngineDiskType.php | 7 + .../V1/ComputeEngineDisksTargetDefaults.php | 0 .../V1/ComputeEngineDisksTargetDetails.php | 0 .../src}/V1/ComputeEngineNetworkTier.php | 0 .../src/V1/ComputeEngineTargetDefaults.php | 270 +- .../src/V1/ComputeEngineTargetDetails.php | 244 +- VmMigration/src/V1/ComputeScheduling.php | 2 + .../src}/V1/CopyingSourceDiskSnapshotStep.php | 0 VmMigration/src/V1/CreateCloneJobRequest.php | 16 +- .../src/V1/CreateCutoverJobRequest.php | 16 +- .../V1/CreateDatacenterConnectorRequest.php | 16 +- .../src}/V1/CreateDiskMigrationJobRequest.php | 0 VmMigration/src/V1/CreateGroupRequest.php | 16 +- .../src}/V1/CreateImageImportRequest.php | 0 .../src/V1/CreateMigratingVmRequest.php | 16 +- VmMigration/src/V1/CreateSourceRequest.php | 16 +- .../src/V1/CreateTargetProjectRequest.php | 16 +- .../src/V1/CreateUtilizationReportRequest.php | 16 +- .../src}/V1/CreatingImageStep.php | 0 .../V1/CreatingSourceDiskSnapshotStep.php | 0 .../src}/V1/CutoverForecast.php | 0 VmMigration/src/V1/CutoverJob.php | 35 +- .../src}/V1/DataDiskImageImport.php | 0 .../V1/DeleteDatacenterConnectorRequest.php | 16 +- .../src}/V1/DeleteDiskMigrationJobRequest.php | 0 VmMigration/src/V1/DeleteGroupRequest.php | 16 +- .../src}/V1/DeleteImageImportRequest.php | 0 VmMigration/src/V1/DeleteSourceRequest.php | 16 +- .../src/V1/DeleteTargetProjectRequest.php | 16 +- .../src/V1/DeleteUtilizationReportRequest.php | 16 +- .../src}/V1/DiskImageTargetDetails.php | 0 .../src}/V1/DiskMigrationJob.php | 0 .../src}/V1/DiskMigrationJob/State.php | 2 - .../src}/V1/DiskMigrationJobTargetDetails.php | 0 .../src}/V1/DiskMigrationStep.php | 0 .../V1/DisksMigrationDisksTargetDefaults.php | 0 .../V1/DisksMigrationDisksTargetDetails.php | 0 .../V1/DisksMigrationVmTargetDefaults.php | 0 .../src}/V1/DisksMigrationVmTargetDetails.php | 0 .../src}/V1/Encryption.php | 0 .../src}/V1/ExtendMigrationRequest.php | 0 .../src}/V1/ExtendMigrationResponse.php | 0 VmMigration/src/V1/FetchInventoryResponse.php | 33 + .../src}/V1/FetchStorageInventoryRequest.php | 0 .../StorageType.php | 2 - .../src}/V1/FetchStorageInventoryResponse.php | 0 .../src}/V1/GetDiskMigrationJobRequest.php | 0 .../src}/V1/GetImageImportJobRequest.php | 0 .../src}/V1/GetImageImportRequest.php | 0 VmMigration/src/V1/Group.php | 34 + .../src}/V1/Group/MigrationTargetType.php | 2 - .../src}/V1/ImageImport.php | 0 .../src}/V1/ImageImportJob.php | 0 .../src}/V1/ImageImportJob/State.php | 2 - .../V1/ImageImportOsAdaptationParameters.php | 0 .../src}/V1/ImageImportStep.php | 0 .../src}/V1/InitializingImageImportStep.php | 0 .../src}/V1/ListDiskMigrationJobsRequest.php | 0 .../src}/V1/ListDiskMigrationJobsResponse.php | 0 .../src}/V1/ListImageImportJobsRequest.php | 0 .../src}/V1/ListImageImportJobsResponse.php | 0 .../src}/V1/ListImageImportsRequest.php | 0 .../src}/V1/ListImageImportsResponse.php | 0 .../src}/V1/LoadingImageSourceFilesStep.php | 0 .../V1/MachineImageParametersOverrides.php | 0 .../src}/V1/MachineImageTargetDetails.php | 0 VmMigration/src/V1/MigratingVm.php | 259 +- .../src}/V1/MigratingVm/Expiration.php | 2 - VmMigration/src/V1/MigratingVm/State.php | 17 + .../src/V1/MigrationError/ErrorCode.php | 41 +- .../src}/V1/MigrationWarning.php | 0 .../src}/V1/MigrationWarning/WarningCode.php | 2 - VmMigration/src/V1/NetworkInterface.php | 98 +- .../src}/V1/OsCapability.php | 0 .../src}/V1/PersistentDisk.php | 0 .../src}/V1/PersistentDiskDefaults.php | 0 .../src}/V1/ProvisioningTargetDiskStep.php | 0 VmMigration/src/V1/ReplicationCycle.php | 52 +- .../src}/V1/RunDiskMigrationJobRequest.php | 0 .../src}/V1/RunDiskMigrationJobResponse.php | 0 .../src}/V1/ServiceAccount.php | 0 .../src}/V1/ShieldedInstanceConfig.php | 0 .../V1/ShieldedInstanceConfig/SecureBoot.php | 2 - .../src}/V1/SkipOsAdaptation.php | 0 VmMigration/src/V1/Source.php | 81 + .../src}/V1/SourceStorageResource.php | 0 VmMigration/src/V1/TargetProject.php | 14 +- .../src}/V1/UpdateDiskMigrationJobRequest.php | 0 VmMigration/src/V1/UpdateGroupRequest.php | 16 +- .../src/V1/UpdateMigratingVmRequest.php | 16 +- VmMigration/src/V1/UpdateSourceRequest.php | 16 +- .../src/V1/UpdateTargetProjectRequest.php | 16 +- .../src/V1/UpgradeApplianceRequest.php | 16 +- VmMigration/src/V1/UpgradeStatus.php | 18 +- .../src}/V1/VmArchitecture.php | 0 .../src}/V1/VmAttachmentDetails.php | 0 .../src}/V1/VmCapabilities.php | 0 VmMigration/src/V1/VmwareSourceDetails.php | 34 + .../src}/V1/VmwareSourceVmDetails.php | 0 .../V1/VmwareSourceVmDetails/Firmware.php | 2 - .../VmwareDiskDetails.php | 2 - VmMigration/src/V1/VmwareVmDetails.php | 34 + .../V1/VmwareVmDetails/VmArchitecture.php | 2 - VmMigration/src/V1/gapic_metadata.json | 80 + .../resources/vm_migration_client_config.json | 80 + .../vm_migration_descriptor_config.php | 294 + .../vm_migration_rest_client_config.php | 190 + .../Unit/V1/Client/VmMigrationClientTest.php | 2299 +++++- .../Cloud/Vmmigration/V1/Vmmigration.php | Bin 62065 -> 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 | 146 - .../VMMigration/V1/AwsSourceDetails/State.php | 74 - .../VMMigration/V1/AwsSourceDetails/Tag.php | 104 - .../VMMigration/V1/AwsSourceVmDetails.php | 217 - .../V1/AwsSourceVmDetails/Firmware.php | 64 - .../Cloud/VMMigration/V1/AwsVmDetails.php | 683 -- .../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 | 403 - .../Cloud/VMMigration/V1/CloneJob/State.php | 100 - .../Google/Cloud/VMMigration/V1/CloneStep.php | 229 - .../V1/ComputeEngineBootOption.php | 61 - .../VMMigration/V1/ComputeEngineDiskType.php | 76 - .../V1/ComputeEngineLicenseType.php | 61 - .../V1/ComputeEngineTargetDefaults.php | 906 --- .../V1/ComputeEngineTargetDetails.php | 890 --- .../VMMigration/V1/ComputeScheduling.php | 208 - .../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 | 468 -- .../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 | 190 - .../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 | 258 - .../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 | 1039 --- .../VMMigration/V1/MigratingVm/State.php | 150 - .../Cloud/VMMigration/V1/MigratingVmView.php | 63 - .../Cloud/VMMigration/V1/MigrationError.php | 239 - .../V1/MigrationError/ErrorCode.php | 134 - .../Cloud/VMMigration/V1/NetworkInterface.php | 219 - .../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 | 433 -- .../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 | 380 - .../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 | 227 - .../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 | 208 - .../Cloud/VMMigration/V1/VmwareVmDetails.php | 487 -- .../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 | 97 - .../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 | 88 - .../VmMigrationClient/list_cutover_jobs.php | 88 - .../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 | 87 - .../VmMigrationClient/upgrade_appliance.php | 89 - .../v1/src/V1/Client/VmMigrationClient.php | 2437 ------ .../VmMigration/v1/src/V1/gapic_metadata.json | 338 - .../resources/vm_migration_client_config.json | 372 - .../vm_migration_descriptor_config.php | 1185 --- .../vm_migration_rest_client_config.php | 872 --- .../Unit/V1/Client/VmMigrationClientTest.php | 6847 ----------------- 351 files changed, 4880 insertions(+), 40120 deletions(-) rename {owl-bot-staging/VmMigration/v1 => VmMigration}/samples/V1/VmMigrationClient/cancel_disk_migration_job.php (100%) rename {owl-bot-staging/VmMigration/v1 => VmMigration}/samples/V1/VmMigrationClient/cancel_image_import_job.php (100%) rename {owl-bot-staging/VmMigration/v1 => VmMigration}/samples/V1/VmMigrationClient/create_disk_migration_job.php (100%) rename {owl-bot-staging/VmMigration/v1 => VmMigration}/samples/V1/VmMigrationClient/create_image_import.php (100%) rename {owl-bot-staging/VmMigration/v1 => VmMigration}/samples/V1/VmMigrationClient/delete_disk_migration_job.php (100%) rename {owl-bot-staging/VmMigration/v1 => VmMigration}/samples/V1/VmMigrationClient/delete_image_import.php (100%) rename {owl-bot-staging/VmMigration/v1 => VmMigration}/samples/V1/VmMigrationClient/extend_migration.php (100%) rename {owl-bot-staging/VmMigration/v1 => VmMigration}/samples/V1/VmMigrationClient/fetch_storage_inventory.php (100%) rename {owl-bot-staging/VmMigration/v1 => VmMigration}/samples/V1/VmMigrationClient/get_disk_migration_job.php (100%) rename {owl-bot-staging/VmMigration/v1 => VmMigration}/samples/V1/VmMigrationClient/get_image_import.php (100%) rename {owl-bot-staging/VmMigration/v1 => VmMigration}/samples/V1/VmMigrationClient/get_image_import_job.php (100%) rename {owl-bot-staging/VmMigration/v1 => VmMigration}/samples/V1/VmMigrationClient/list_disk_migration_jobs.php (100%) rename {owl-bot-staging/VmMigration/v1 => VmMigration}/samples/V1/VmMigrationClient/list_image_import_jobs.php (100%) rename {owl-bot-staging/VmMigration/v1 => VmMigration}/samples/V1/VmMigrationClient/list_image_imports.php (100%) rename {owl-bot-staging/VmMigration/v1 => VmMigration}/samples/V1/VmMigrationClient/run_disk_migration_job.php (100%) rename {owl-bot-staging/VmMigration/v1 => VmMigration}/samples/V1/VmMigrationClient/update_disk_migration_job.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/AwsSourceDiskDetails.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/AwsSourceDiskDetails/Type.php (93%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/AwsSourceVmDetails/AwsDiskDetails.php (95%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/AzureSourceDetails.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/AzureSourceDetails/ClientSecretCredentials.php (94%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/AzureSourceDetails/State.php (92%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/AzureSourceVmDetails.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/AzureSourceVmDetails/AzureDiskDetails.php (94%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/AzureSourceVmDetails/Firmware.php (89%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/AzureVmDetails.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/AzureVmDetails/BootOption.php (90%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/AzureVmDetails/Disk.php (94%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/AzureVmDetails/OSDescription.php (95%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/AzureVmDetails/OSDisk.php (94%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/AzureVmDetails/PowerState.php (93%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/AzureVmDetails/VmArchitecture.php (90%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/AzureVmsDetails.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/BootConversion.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/BootDiskDefaults.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/BootDiskDefaults/DiskImageDefaults.php (91%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/CancelDiskMigrationJobRequest.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/CancelDiskMigrationJobResponse.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/CancelImageImportJobRequest.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/CancelImageImportJobResponse.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ComputeEngineDisk.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ComputeEngineDisksTargetDefaults.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ComputeEngineDisksTargetDetails.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ComputeEngineNetworkTier.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/CopyingSourceDiskSnapshotStep.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/CreateDiskMigrationJobRequest.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/CreateImageImportRequest.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/CreatingImageStep.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/CreatingSourceDiskSnapshotStep.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/CutoverForecast.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/DataDiskImageImport.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/DeleteDiskMigrationJobRequest.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/DeleteImageImportRequest.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/DiskImageTargetDetails.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/DiskMigrationJob.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/DiskMigrationJob/State.php (93%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/DiskMigrationJobTargetDetails.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/DiskMigrationStep.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/DisksMigrationDisksTargetDefaults.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/DisksMigrationDisksTargetDetails.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/DisksMigrationVmTargetDefaults.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/DisksMigrationVmTargetDetails.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/Encryption.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ExtendMigrationRequest.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ExtendMigrationResponse.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/FetchStorageInventoryRequest.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/FetchStorageInventoryRequest/StorageType.php (89%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/FetchStorageInventoryResponse.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/GetDiskMigrationJobRequest.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/GetImageImportJobRequest.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/GetImageImportRequest.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/Group/MigrationTargetType.php (91%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ImageImport.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ImageImportJob.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ImageImportJob/State.php (93%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ImageImportOsAdaptationParameters.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ImageImportStep.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/InitializingImageImportStep.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ListDiskMigrationJobsRequest.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ListDiskMigrationJobsResponse.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ListImageImportJobsRequest.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ListImageImportJobsResponse.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ListImageImportsRequest.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ListImageImportsResponse.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/LoadingImageSourceFilesStep.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/MachineImageParametersOverrides.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/MachineImageTargetDetails.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/MigratingVm/Expiration.php (96%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/MigrationWarning.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/MigrationWarning/WarningCode.php (89%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/OsCapability.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/PersistentDisk.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/PersistentDiskDefaults.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ProvisioningTargetDiskStep.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/RunDiskMigrationJobRequest.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/RunDiskMigrationJobResponse.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ServiceAccount.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ShieldedInstanceConfig.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/ShieldedInstanceConfig/SecureBoot.php (90%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/SkipOsAdaptation.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/SourceStorageResource.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/UpdateDiskMigrationJobRequest.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/VmArchitecture.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/VmAttachmentDetails.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/VmCapabilities.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/VmwareSourceVmDetails.php (100%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/VmwareSourceVmDetails/Firmware.php (89%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/VmwareSourceVmDetails/VmwareDiskDetails.php (94%) rename {owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration => VmMigration/src}/V1/VmwareVmDetails/VmArchitecture.php (90%) 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 diff --git a/VmMigration/metadata/V1/Vmmigration.php b/VmMigration/metadata/V1/Vmmigration.php index 19f7cd9db63df44fe135d4697afdfabad9ec3e10..661d359c144b21ee7f505b79d59513ff6deda99e 100644 GIT binary patch literal 62065 zcmdsgdvIh|de^pIBOT3XG-p`8t%HgB z{rp6wTCSIK<-Lim#?DT@I*}_ED}}v$b#h{2eq~~LWn&^WpWb*9U2Ek=HJ6{6*e#cL z_wrM@y>erFYQI=4>|($|xiqzZ&HU%299f7`wwSL~vbp@kjn&zud_B9Jt!MAukb~Tt zqe1R%`h(oty!N^fxxH+yHeviMzFAD*f0f48ULiM8t7F34#M6aZrcf%>3)#KG7XZ;4 z6Fb?xS|0tI+wL?oMeojqG!xeTWF7p~^W||iH#zei^$eXiIOjPsrMz!?1 zTsIBy(EICN#HJ-Hg?q_TsZ6_2F4bmce3<+pT6LV;E96V{&iX7A@_XB}`TN=ZLb=*S z*K}#8+*!A^yu!A&VOuPhcB_q2sZiRzw^AV-?`&_pBcE?@-}V>mb;Vhwik1377hUBR zFJ)^Fy6C%60EN}F#Y+2q*DAStscN-cod-b{_By~J>bVZgYqaPiN$G`86cphkx3@hy zSpZ+T>|r+H`Lp8p-tQGJbi`4di`;xtGN4I=0Zr~-8$Ykc%2o>CP=xBthsK{UKI{-a zXSNhVs|IS=DeB1$3P4-+@q*F2s&G?%dP;rT^AT{W>>;3P^tfsyc_J9g)V9L1(B$6t zJmHc0s5!3pk(XBlwx|{wIIl%rqeN)_Y9%+7r*qG2^TDg{dfVtbajr&PS8;~IX`e?FYz>i|FT9}lOL*iqWuEaF%1Uzz>l!>MWrVbQ?& zDI>AbZCz4LhV7VX(m_B^oAA10yE9iFiq2aT8!-%!MgGpCSg#j zzJ$gelT%Dvr`VL8*QFA&SyXb1>=lMF;FSvsy-MSl&gE*y1Mn;{rq-gFTX0gfGUP_)jX~u#@Qh`f{n)Ib%b7x3N$*^ zi|&5wJ+CjZA&*4lr8zv^CNE?f<59e8_dI4DnVz&lYfu;8xID&7QcTgyKiA&!m&B=D zqgsXRkdZ`Af}#|LhNtb9vB&GmC3*Ak8rH-)xf`0p;XwJ08k>;o>1NDVMgMNK+^CG5 z#1KQXmmxZQm~@>9%jJB7+C#n=*voF^_iAIKQo4A#?Ok1z-BP7`^}tDqQ`I~PR~ZN; z;9j3AZ`H<5$pN3S4md~6KULo1o$-XC({dwP3PovgT2I%gm%;sc!ZUKhd(YZu#H{7ZbMpTC}`_2TPxc55#$xym3<{el=a&v#h# zKFA-)%XtWLVE=x0uaRelHPiE2!u|J&cmZ=YwLH%P=8))LOC{&;LcSakVj;b@zL8nK zyF3RO6Y^$qZX>;!8trpN#qqh@8yo18S=mgjjUFR06~D-T406}yq%D+OCis#-HCqu~TEQrTpGAIx4m$w#Szu7-Uj2NHXJ%#0cR2VYFtEvDQb)zMM-D zmP9g$DoM)YpsYx>t62yFN@7%imvRPp}nn!B>(eA#}NF`gZQzbeCCPtdR@ z?R-8@?F;eLenUiy;ICf>fBlh!c*e$GeF7;x8V>7CKs=WJVd1hr(kF%$p3r7G>tY-{ z60WaC%`^%s6^%`UovCOLV%`?#Yxf&<$s)JQ@0EPhh2p*+vmW-k>N}6F%D|vmGDg{AXQj=X1$9tlwI=^j`^V7>$JEIZRBt%6uy$UfwEyvCGX^tT3D}jpuN3oMr60JU z)Ejwk3-t~j;=I1QUkoryfrL50CR=$a4Nt#lT2R+(qP=&p-iSZ0-1%g%>9JFMUP zP0=q6u*$j?W5@N)t^NpFVqn_SHcQjeN!#3p%`#-^WWFD(NPW^Xr}ascutUK6K51H7 zLWW*q!9(ySiF_$nJ%I2J<1b5%F=nom*M4>Y2>#V%|9EFMote*mkbGA>X}QQ1*1Xp3 zB|ZzeyC&`X+A-kXgvHBSxHBV;Jt)>Pp5JBk8r%4$5Y%%x&e0x~Z{-i% z??{N#5f}=i(jYv@i1ATg>LDWi3c`=x1O2l_i%77K_~kxXG{F-J6=iV8Z}t1|dRL%7 z)tP-jE<8&S0(<+U^QaE@;elf|;{L*b7!4!3^BFOk&5=uwV9NkGw`6YT| zl5h&8eXOipJ%FcaH?xNe0PKa>rCqRSntda?3$OX({%~;eHL3-8^rYomdP{1E2mq^e z>f#bBqGa{d0UWgqojk3g28Ri)V5zg+W^E5cuBnia+HDMob=6YR3Qkv%j94R#Aw7WQ z`tgD|6LnC)yb}f*;8vDQ%Xu6|y*!Yjp7Fn$m`N%Gxq|^(=yK~De_r&`K8+goS~@Vg z{!OE;{B1lbo`?e}&hR_eiQU%^CXhBAW$5jlbzp+`@i$XHsN~&W>KBgTPg4xu*%7BX z%!gdOv_;gB;x`BjZ`hBs>AINY;J9@;(wx5nP!O)?T4Rf20BNK3;n2qQI~TOEn;&_#1Fb@*}EMpdwJACVOf?t=>;*7 ztsumWG#>;M?^NOPt2S~7$<1dpoHEpnuey8BigCYvt-Mp0Q4P8!Nn?!e&a!Z_`v|Wj znO%=mlOEYPM{!bjyDgpTD)#G!7->`xZM_ZcMh5A@M@x`hv2N{c?n0Nf3LSBCrc42J;>3xmk#qMq)Ibz*vl?e*7LQ1}#~0(1OizU=~cK$S2SGq)|*#p}P=& zh=CZs7Un(orxTD!L-^*bh_O=sJ;>pez4C#?Uk~M_R1%B8nxHnBQNZJPvQWw(j0H5t z5hIeNcRG&yE*2Xe+u%ohnvhZ;3935-5wf2!|AW)@3}4#K#d?W7=?(;^DNR4n0zP#CJif2`pDxBR(#Uu_mQW5l>lJ1VhX0 zty@C`;wE5-;E}W$;?;oJ$kWzhbx8Mb11<<)u!{!=Jlr|(me4IHr3oqYIUNLAuODEc5vZSUYrz#Z7ULLrh6|9z*rVv@7*p--uCV;#1CM6cssj2A5tg{ zZ|Ut$UtflB5}Yss`(v=m-prA4Z8oaUz}u( z-U|nmp(sUPf<#Z_M$qRDh3cH~b8{RW;@cYyw3aM^;@jaC^#kx&23i!umGXN~AL%B} zOF3v{+U~gvEp~F1`qQHB;a%kz%2T& z$nMNKHpTI5HFv*Ihj0twNgAd`reC+Rp75q@7L&#ha$Gkpgt1o_#rf5hJE^ryRN(r6 z=vi4t%=$6W3!w!9iwsgnX!|k+srS0qh45Dmz3u$$%F0G&1rY%&%b^%}43Sz$W2`~Z zH=ABrAMJ7X#7J;`&J*I|=29lPHg_|UYM4qkb~cfU$cyh{uH7Bh&VvKXXk6 z5;G2v(&k|@X$K)pX5>9hCDKD_t}L; zH3^%|sUD(Gd}lw5RYN{(ah9gdBV!5_^QVIm`wqz=-WF#fx9_9E1(|QA*EVib)L~Nc zn~l4xVRiwgb8~YEd;yV4tI4&b>H%)B)j970<4V8u+AA0hsv2<}Vk;Ev$Q-7ZT>1QS zW+^#0+UH(n+jIa;h3En5vs|qcza*z||HTmEWXOotl0)4JG8gI=X9x%mXs{QlvlZE` z$80UYYKWVKSPk*A@TJKdsnw-P%&8aNm1D$eaMP+d`e{4u1h!yuWqlq!9VnDEf=(r~ zyUs#D%K_esWO&2VAMbE6{>AU$ILs@bd8OSh6Iz+UE$0;bIxg8)8&*vZOD26H2g_Bl zoK?3U?Vm4$`8JV8x1oGfLJ^nEkkC6$5x@oCW~4?`n9 zcQTq0O80|-^zJp-vC==jBu-!|W7~r>0&AsHpmrY~XTGu#KwYNfd$wj$dL^XI5{sXm zF-7>N+ZL6Mi$O?GYZMC!4gnshtpz<;0Y0s)uF|Jo`Xv7a0ZIm8&!>`$iz{>BVffrn zoXYzJO$Mm_?d4m`D|ePhj~$Yoer*M=x5TIxM{C-_@P;_H&8f2Bf#f5yX94K`s=Iqj zoRGJmHy(VL!SSB6W3?gw!PkFM(W5uq_3&^p0iXe1<^DvEI2Tselm!7U=6z1r+Anez zUYw~$gRa*GuL(9U3%?_cz-BSKr82Nn=$;fqSz53hfVg?w?uT{-pB+YKt4cJh zxxd;Y9+R82&f3*csW~A zsZTgWM(Vlp1F{^4jR~N0j)5VpC2yoM5h4uai~02Wt#vRJQofdxtLrycHb{N?y9sfr z1r!SFQesFukhJB>e);k-sl{nGYWJ_?~1Ig*O*KrHVzSFKl z8$A`jxcQOUQ{rR@9QV%-h*P)g1ufPii>zF&L($_be72|H0DGHE6@0zi)Q%W}CQi9) zny0lJhA^j%z!}dC!xY@oG9JpZAW5x_(UDj8_h1+}O!?5?CIJAXN*w8r?FUOzi$>4{46Z_Ni9ng(ZVZ zG5dM1U%fot zL`18=aOB_Yb-%kuTp}-ru{(@ho__{es{#Ma%Q7%*(&-FUQ=)Ibkbh5}=*YDF;%QpT zCVKKU8n|8wWn@Y~_2=@=MGmMIssTM*UPfg}@8iDb& zI3KmcAt&j&I1|-MX?0y4Lo`x;QA{vWT0lRNT_yu`*oEo-@q{?9f;+q*1AVp|Ew+Hg z?=H_eaurB3XHGX6d0U2ZKiDgJOs zT%3!__2x`=W$iV>vQuJ2WyC6hl8tAxFMOE1A}(7*(hXVoW|a#~k#SABOjwkI3{^x@ zg)FcG)fqvg)dGqR$>ozaWq#zCPWsi8S}1aO09K(PNSluSRhGWnL7WQ*AIF(ZmRV3r zQ)D^ylA)%dusc#hWK3BCl{JQ>^d)VWBnZX{DuGR&hpH*vIU8PH0_!I8R?|aZ4Bk&& zNGOo3a7!FV`56?KP!2Sj6n0W>590cC92{jZ z$CX5&T|vC9>cR}{3E@Z@f&z)fXEVeQYGY$W$g)9)nK9#2;zV$R;(V7sJ0!*fXQydO z=J_}CJ~$i#Oz#_ji$w$vOD=X)3~W8bz~(x~ZMoTxj(^P`1^+@6^)~?P3I$;tf^|7} znz)wTD&CrmCWAEDA=7#@kYd*<(~{=&|DQP4uOdjeNm4l@jwzvs;{%wxLOevOjQ$`^ z(EI_Hq?C>5($Fb%-WMu6MU}Sciy=M26Rbu;Svq(~$v_g9LlZy=wdf6WmUFp(K7pu( zfQ*3LUEd`f7yBLTIw>U;s1gVm&_arY*qsr5^4l3P8sQ^>O?7z%0rfJtY&CiJ2HRO@ z@2)H&NbT<@#5rH$ST1kplRL=iM`{~+n!WT##N-TerQtGrl1HZP)jXodoaA!Z$VQ<^ zCo1Gc-a6cc?rUPu`!*)dtgNQilJNV4jK&DLOH;@lVoXpjK7+q|+~4dKr_?d{lREE; z(@32n=>WDsLIvdeOp#kgXR8faSN zBy0~fggm@Oak7Nn&t!S~Nj0FI8ICFO>#s6!b_jMrg;Io^V?Kkbmp`xF_C)TwjMZk`pVZ(BB ziBa|p*+bOi1YQDK#B?YFdRI6w)Z_Se%~GlCNwSBb21nm4YJrTkQ4HOzezM}o+0@VJc!+2>lNps`yfu$3jxJYx>PrTAdS;K z`)sWNbdN#29BmGGnCnM7TArGJ>o^1(}+v8sJdLtfgj zIATMybz~RaFJk9C*AZip-PDDkBd??K=*mlH{8e!_dc^^L9#Kefin7+51|@xS8zpHF zsOnot_*hhwV9 zHeDAy9gf4a36P?rl=_fifc#nQ83rh7SGD}CAriB-#!fQ!lMRZ+ynY<3Nu6wjp%Mh% z0l~lRY4u);Xu`oQqszsfkcVYYxsF+xLCU-?poP@=w}~@(rLVc(g&i$O?Wfs1rYVU# z$R9{e8J_NpKXk0?cW6s+|ENcdh8GXXrXRIBQ5=k@X?XgRR*o6&JxTkJrtW$(a1{sG zy%#}}fVydz7m2L9V)q_Zm`uu$>VxOd4WAxg5vQ8qLV*xnL7TUW0ef2dVICKccs1uYZD(;EavJIPP-i0@S7^p97$ls;RIXrDImQL&TIj{Ve=Ff5v9M2sJ zUI>rPH;`SP4UX+|bv-Z&cFJ|DU`D$sHF)<1WsOgWk>F=D%LD)hL<}+t(zG(sQeGCW z3rA1PKDaN7OTjiFc*t>%ZKCW=4~2W(&xjEvfa}ucFCwvH8!6b{Ga=M^c)E3QTM5g9 zLIrg-GqT2}Os9|zhe7vWCd3%K=hW><75lZ9=o2Bg+@!?4%TBw+f^l&b`Na+{$O$*D zce(Z;GX1#uRj~tmT|i@zM3&KRw?Ba6i`+^^V=uPiupm83Hxk0^Ib?%qVw)-8+r^x~0%=n+gD9$roS8F3EQghugE&3r+eZyH}s z{aG=#Km{$4nDL0f25>1^_5Kl!58#@{SHN8q7b1XDAAcToD_Ann-s{Mi-=J@ZnS7{h zoFs^FwHXq~+K8|Xh0wFK)||Rd5vH)56}h_i%>D<-S_f|V8_K_h5Kr}2i-({!M$tp&Ct!S#&_Be zO?Z?SrTgOvF&?#eMm6WAI2qhYeb?DDHUe8gnAiPnhbJS(S*!{Sst@n*+l%54E(amnmk+T4W3!*=B?oQ9l zyB{Rq5%KQ@z0xk@mPHxCu;u?hB!W0a{7CMB$3#(#B@oArcZ*Ofxt({59x3xg@laV6 zNH10~%~!<$L#4E7*J_uMoe#$&;ZerrCI`}d@s+@(ruHlT+}xiBNX%{n!*zcEun@}4 z2yxX{^g~okdu?t}G!w-`9S$?mz?wT|p5B_6i*&gr=9PKjFs}?OsmoJo%^RT$j=_T< zC-Inq#sTlKFIG3&Mgk;Q2JH#7A1F}%Ve)dj%A^YcHey{$fc-JV|F5Bl&3^vtZ{e^9 zMlVgR{hz@k!UW)jKL3#dC4|ISsr@Cg z_#X^zW)Wl)@NjW=?>z(!&+7puqM>Q?)dm;w%FP3-UHn@JWgs^1FVN%lhuy?S%JILX z3}S(GE4Dw2n*9C&X+gQ86Y5?}MkGG20DoCWbA*4a2SErG^=i6~n+ofTY&DIQp3HZz z+7#1Z$7Ru5V!QMS_ELT;qBghuXrNxIvkMgyWh}kdQlu2dm+DjET$Rl*h#1aEOy6U> zEy-fimqriC4#V!Ri*d?)QJ&8Iy*@GGaaQ>@I+UWm9D+5ZaXBvNDA;vU4lsw#ytdcG z34V54zw*Kx^OzPG=#}TiGAb0p$g#b|FTrrnSFqq5McQUiR;#GEK^y&0XYzi2uY#zg zk{4}o)|~DpzD_RUE6;-ptGq(Wrd4i?xTALe9v-CfAcfKVoP0$uGq*Ay4pljY3Y=UM zBEv83C8+q;`pWG!M73<9B+fjS#Nm%UGR2%fuBBEN(^PB%(k_1`;u%wdZ}ZnaT%xB} z)-&>*FSDDhR57=Ruq!pr08s3NdOuM8bc}|+y^;1x^kDpzwGH)kkk*`B#dW8#UQYth1MU33r}UgAnGy z8+HrQfwUMi15I~<9D2dd#{!u?Vo%C1E{ zDD13>!JR@?eo}OA4;+ddWpY6c!L)@OE4Us*HTsN4thv?O+BL@^X7-GX=xO;^@|hXY zC%uRhJOejbE?dcNp@;zDC~H*axU8t$?gQK`&Kdo9r3<0*Jgn=+jboPolH-iS%h|MI z8QK!|AM&&aNzv7L2#o!#pXXz~A@u0b!b+ zgGRte7%A)}2AYTH3M1Bn7-5f(id)v}Fp8*9Ix~z8Gx}zg50M0NF!!%bMh(&xLTm;RBIa?Bh^6yV zzJZWpRPLRzU<+E{__v93m_G9(M~Z)t5RZ{Ug8~GUJ4BM1e9GHXYvw|_;Y(6Ce8G9% zlA;(MELfq3m|bKE0cn9CE@+kzkjftY*fRCQ13lNlsgSab|8zm*r+(B*+q0e0Z z${u$WhJ<-^xAg-uVjRj&cucMGpn#^~&r$m-Ch!J5J$mHT z{PhZ+)0X!mhUhb5oXLSgzqD=I3!)=5iHl<=vXgVNW!jJ_`VkSmjYmdQ?yQWqYMO!r zD(xolB_5&mEb*=YHY~<%AOyQH^+r6ewjlSBAByKdQ@a2om&lv%y%isfV!Ysy@Ym{iVypqc zBMdkK`TVCpfP8odI12eVNRCg;Uh%dy?)3uqa^kTTxW_Y4;_-0IlOtBtqe&uA4?e`4 zEK9%bzaj++R$;Qe$P(x$14UjMEk}t>D?wE!b#>H5oKn>eJTjIP;r>#uIB6_WzHEzxDatCtBXNZpt-|)s5H(_=s>ZRq$ zt&?T@V`KhR7hV{zhTkKiL^Ha=ADLlvc0lwIz3@BZ{z-*4o<3W4&&6Z%(vtzWJs{j4 z?ic5xnXI!b#sYz_c$Ac?;~_y)KTBv=MUCaH)Z{5hIeFC^MT)05kURVk1J_P0NI8YC zWmW0Ho^3-VVmt_#VD!MqLFM5L0a41yKmkP>Y6W46$PM#jm$Bu@Dx zgpqjlju@-mFXZ>O;neb8r(i-+Owuk#udB}K5(HCZTcZ{VXpA9^&bs47E<1)tX5AeX z{b!KC5jYn-hSZ-&#`vDRX@~r`g9_QAGQ4@oJfWWOEY@=63Q*0H(i86QQ+|EqzCeHp zWb)C?9`|-e^hlHPv5!0@WASE(G66~LSJW0$B8Zq8w{-EyxIe6Pprz*M$r<^GO;ah? zjkVhp>4j3R3(3WGN(#S@2VM=v8bM8Xk0zME$sr|VPI7-EA)buA+9`x(H(!D)nS7b@ zz!aE}HdToPPS2+ui1Vrj(y$i&;!qyZZ()C_E}*LKBSqLQN&>lO`F&3B%4KoF#Y?nd zX71jWSsBJgXnWN4fIX_6pnqc!dh$%B;26JoHpOmIaEx&}H76#FiloNPfe0_WiH#?( zwhjz&$IGBGCd9&(B@r1k1w*dWMnrpdhcOZzboap$|JF;@GKSR0b=XaXQPTu1V0M-B14q9CN192 zcc3r3zpSFugTs6HpA6a5)eKGt8hMA&LYkjqKt|O4tiu~h=982@p%*6U&hP##9uwj5E)7~#Q7|W=hx(G3&9%tY#8sR zhCUpDCO*O%KS*5Uj;H%=s~0_3U$8sx!b=W_aC9O);W#NacEsA=y2`6TbcnJrl2kqt zQ-~(KcGJe#zUdD&OUMYJ?SA%xiGeA}b|aD2t;Cq^Af%v_{XD&h2MeBliKdsI@6%Q7 z;|z6%P4C#uFT!Z|HxpKOP++ZujXI48MmJ?1Xpx1)_=;xy$HS@Z5MtvK{gf$s$pN1u z8~mxJcGIKbpJpM8M9_o#rCv^lHt8pTjBs5I*H!Hs%&i`;vL9DKz?w%diP3B;Q)3<0 zQ1WR{TcT2_!_)REl(dGH5H{OBf>sOmIK@O_rb@Z$f%j@`l66Pi z$HaJRklg={#Fi$iqR^CW08K)ouTkN-5u-qsuh#17PPMRdOCh4p~wr?uU50!V5nlB-Md3fj}J(?jCyEfFrpIThjijLb={D zi;oa_#6A|NL$!=aWl28rz$fU=e@j_ZxYU%L*rGu2->TC?cJ?6KXRT!b5rKANbsBe` z{Np7Q0mL8am1}r(P5v>B2iNe&`o=Z9vqpc+T^k+X*V&TG^U1Y&Jg|mp@s}i<$kQg6 ztW!&N-9)5>$D&sTwh4g)7g|W?fjz0YjpB25ds28hmaCo!lxS!5XBY?jTi^R@zdqPA zm~eG4PPn_LI2;M+k5qL)H4zz%69Ix!9#+KZ=3Ui_bm!aJi`2i9C6wEQSBK(4$`A4- zPB&vdci4(!XpY$ZY zaNXW}>x6I#1jQc9Do`Y9$<+o5wrRiFhMLsW!r{`9dR&Q@0l7IO|8tDNtT0f#{ zD>83ewnS-7=Ew>7;~s0>Y<(VF-Zs!|a*?tN@L0JsC7y3N&`rD@ye1dwb?Cc-=Rd~+ zKpG}fdT;5e&~QksNG-3cSN!Hv3(4Dy8>1g_o)#0fhO%C5BCeIJW!rP*Pf{A4Styh& z;{0g5b47eKG*9c-*j=1(@RZE9{7^fJrdrzY8}3(rG9iwe!FqV^>H^Y5=8~()S>%0e z+zl03#aRVEFK^=AH2wZz61wR+J$3k;cqZ8F#^y3=sV=8B?yRicLRDN;YF$Vo^}5Fa z!UdbA=T{dZTJ~O96eF}<@YyK)Hl=M#xaU@uH&bit&9Bz`m4)#xD}kKZSjo`#^jv}A zy6LGOD(WLKBO>W#Go88<+6<`av&r@J900~d3%3^+F>XAt3K!e04eh@zC|i|R=`&x?D{h7eAl_eMGuu9JL0oDF<6 zI0n_(Rfr-xuCAq)(zlmJd!~Pb@jY(fl^rIB@)nloh$JU3dZi*ei@QW5B& z`1keqlPW3y+yC`%|LGn?GEePagMlPlMS0XWly#ssb!Ey^I;O5XoT^EUwdQ;|A%Qsb1qHy~e$A zX}8)ak&3KJYC}_VYhOuT6a#AX<{ZoSljnIOuh!&-ssDpuEy4Mi+sS6n4DcWh{2s?y zK57drvuT@PHR8Zh<%X{|DtI`G-Vm%kkPuy;o|fptE1hiboIJq(DF9=EsV%_FrfmYY z`<3Jsadx*{MzqW%kh@;qYV1s=iWL-Jk2*dB^{(()wFi;|P)34pFFW=Z2ZN0@ICk%U zxQ`;~C6F{9fIO2=IML(kbVY}z$sGIs zGv9COr6G&C0)8>^mE=bwUvO?pxqm-7rLKd9e1$%sJ@kpsM7&Dr{0|84 z%tM=CkJ+&nz1rNdFLup@XRq*190pJRE3_!0xQHhRYmWVejaJ<>-1fr2t$Qm%Uk?)c zyffPwq2nsX3v*N|9V$f$_43NqnuD;ObD-M@Xk$29bSDj}U6P8J%>^6tZ&M9hdj}Z> z7?C^*6kJfo(Pq#c`)Rc7ry-0X`+o?szszApp*@cjBwkX4?}OsMcX~DIM@{_ixJQ5m zGm-CmIxsF@U{a1au$cX8*{{w0`t+;M7X)$1^ebT_fj{&t>6uC-8lqs&fkFw0w!)i6QhCz8*5PPL2bt9 zZrbGVdhP8|sd*~I*}oGg$$G0XK@3VZwbu~DaPlv=hmvF78Z-OFCdK#8^bLuJW~27h z-zl#PFp@|#h?M^c4rk`I?e9cW`!;uCziXa+{R(4hcc=YFz|?ib9cWyI3*4?O2OGBu z9kHJ0Th-o<&IML4Vf{oh*ni$?CG3ZSZW#GJ|1T6@> zr94G0U-kadBG$UQAdjD0cFgUjGxdYMxtQ)tv1K-D#ADqa` zUWnQcUqxMWmn7KTTxmYcbfM?u(&^lPEg?>j@TbA3IraePKwAy79aBPGlwf%$C|KTf zj_61og!T_ZZqxw9c&v<;8k%RUDwiJDy=}^tdijSw8t40<1uEL|%BIGM{Nd&rkQgcR zF9H=2Fyfc?jAXt~YI5`|kX|*ak!q5>h|^oEl(&8I{B=lSl79RKF}G2uwT9hpM`-G#h!lPe(-r$E z=g1D(`A1+pM0_4#F^nhBRznpNdF>DGg5CIxRKw97wR$V2vvN>ZUeNZ*g3~p}?sV`Q zY6#-}={&H;LihFHkz94I#M9lwsoiS1QK>mUk`RN~NI9fqFNUI<>4mmYwA}r;xygEE zwoT?`(Kh~baBb#eyg2*57%lbsVwhd&E6H*1wTB2d$XUhao@iUDbayx||8eo>-}{A#rZ$QF_tDTw|tAYwJX9f*vUZ9=ru zwW@#h3Lj8=nD*abzG$i-AEWLxwQm!qZ^M-Wbtj^GOELfbB=5IWb7$Q*{NrjR=lUmw zsvPoc0+KyU>Sv+~&&POHqq?*S^>+g5YxZjQk)nnHcuF}KC2aA4S0ifvlXUwP^^OK- zfgp*3-fXHl_7ZW#q=Owa-1fASsDA1moeMJUmmQ8tvFa}mr(l!W^`D+{ei4!oxN=}= zF_KWYxdxO8b2G@8+}37{2cd2( zvtA+D_G9tZ`-H7PX=59a^=rY{u>8L-Sz&%zTIWCDM8S8$D{$<@9??TXYmea! z&*Q#p@+%FV?a(-I3!+X4xMtXhm;H)z$r(xQ?YQL3<{Gegmt3%yx=g^3O{HwwVUaH8 zGAZ~~{%X$8!PbQxH-?X~_5~Yj0PK!9V|4eE=Aq~n+YZHCE^Rx^0Lmk53>zc0@daYE z*XxeCKE59u6CPosW2CsEJ;HLSsP9K*a<7{I(D%lhZpSAy!^Kn8s1D2k%H?J*%8ozG zBaQZLLciBFhn&8`aCUO8#Q%xc8S5m&Yz()E=%Jyr#|uVwRCLuO;vFqr>zk2uGSC7k*d6TKGQsm*=(1+b)NBFdRWISh0}=XO*2 z?A7L^LNezFreAff=pOhhW9^HnAOg!if)@u#Ve-m7@=C!(t&^3~wwnRE^dHd(Gn z-U&|`!@(kYXz=XvPIw-7*}PgcJT`3i<(=(N0=G11{tOVDwTkcM{Hz_Okr#V2Nxv5oQvF}YJiX&p+9N)Da?pJiDHuvkByS}B9R~Y3Ffg=A4 zC?Ao58-wx@J=z5JyMP=oT9bYw1vLK>xao2(M)xq!Ak&I0O8*z9&9_m9rybp?%?%)n z+DmaM#}RuVjfl6DxBL*m=d{0gd>MA<)@8~6RdVuvybZD>v##LMZER0&E_r6t$<1qD(O>V~lb`S1Grr>=*FNZZoV(A=$Obbr zMg#og+6T$ciznqO9~7GktISbFpz^K!LHm{4ALI|#km`p*PxvcS#h(wSWMLs12EX#( z8GL;BLGrG6GQL*n%N1o1HL6e50)QYv&VM-02W zSKi9*v1ElorKtIEYXB|l<(Hln6Y76gC+gKk{<+tM_X`5k>V@3Q%+m#WLrhg9&u>q> OAzQvK+dUKyh4_E90xCWL delta 658 zcmYMwUr1AN6bEpAzkBcQ_H*L8bFf_p=5?c?m9?bMhs0TlnnwOfF;eHamO6L0>xO%X zWI~uqY8;551SRny0<}XLGSTOV0@0@kU+O8sKM$oZnKQ)4^MUU&%M{ql%h(L*SfhQUNu&cjoK;3(Us*rQ7l6+dBOSoGJE$^-!)}g}Y8X9JEy_8JtM}iB`C=!yJQLWT z|A-^c;qUptNmVXY6`vGT3G@Yz8--&8l9z|YuSRAr?dyeag$`W5lBB$x&rERDlZR`? z0|eZqlXR1S-8TVyzB2mC0ErbFu3uj^^9Lf!f`cX-zNsYyB28^*slP=?4YW2_z^{f; z*u3kfNfE~zhbgo)uchX8KeN=R(LPP@t_Vd{y~7_+r3@y9{+pegCLWU{G1ePvKQ?+~ zR+iS8N`(Bu*3PhAHnj*+ZjZsHOlBiJ}#CJtqZFzN77by`dhsCRm< zsZoDtuve;tlEF$UWy91^HfD^7l+SBmHn?471LwjlnFosR@CUjG=N+oUrN!4gRxF24 m;oKLGRgh~wmdcRmmf`o7SKJ^hJD~Ld@j9Vudl6i_)&BqmJL3%i diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_disk_migration_job.php b/VmMigration/samples/V1/VmMigrationClient/cancel_disk_migration_job.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_disk_migration_job.php rename to VmMigration/samples/V1/VmMigrationClient/cancel_disk_migration_job.php diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_image_import_job.php b/VmMigration/samples/V1/VmMigrationClient/cancel_image_import_job.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/cancel_image_import_job.php rename to VmMigration/samples/V1/VmMigrationClient/cancel_image_import_job.php diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_disk_migration_job.php b/VmMigration/samples/V1/VmMigrationClient/create_disk_migration_job.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_disk_migration_job.php rename to VmMigration/samples/V1/VmMigrationClient/create_disk_migration_job.php diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_image_import.php b/VmMigration/samples/V1/VmMigrationClient/create_image_import.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_image_import.php rename to VmMigration/samples/V1/VmMigrationClient/create_image_import.php diff --git a/VmMigration/samples/V1/VmMigrationClient/create_target_project.php b/VmMigration/samples/V1/VmMigrationClient/create_target_project.php index 7b290dc3d393..95eac6bcfefb 100644 --- a/VmMigration/samples/V1/VmMigrationClient/create_target_project.php +++ b/VmMigration/samples/V1/VmMigrationClient/create_target_project.php @@ -36,17 +36,22 @@ * NOTE: TargetProject is a global resource; hence the only supported value * for location is `global`. * - * @param string $formattedParent The TargetProject's parent. Please see - * {@see VmMigrationClient::locationName()} for help formatting this field. - * @param string $targetProjectId The target_project identifier. + * @param string $formattedParent The TargetProject's parent. Please see + * {@see VmMigrationClient::locationName()} for help formatting this field. + * @param string $targetProjectId The target_project identifier. + * @param string $targetProjectProject The target project ID (number) or project name. */ -function create_target_project_sample(string $formattedParent, string $targetProjectId): void -{ +function create_target_project_sample( + string $formattedParent, + string $targetProjectId, + string $targetProjectProject +): void { // Create a client. $vmMigrationClient = new VmMigrationClient(); // Prepare the request message. - $targetProject = new TargetProject(); + $targetProject = (new TargetProject()) + ->setProject($targetProjectProject); $request = (new CreateTargetProjectRequest()) ->setParent($formattedParent) ->setTargetProjectId($targetProjectId) @@ -85,7 +90,8 @@ function callSample(): void { $formattedParent = VmMigrationClient::locationName('[PROJECT]', '[LOCATION]'); $targetProjectId = '[TARGET_PROJECT_ID]'; + $targetProjectProject = '[PROJECT]'; - create_target_project_sample($formattedParent, $targetProjectId); + create_target_project_sample($formattedParent, $targetProjectId, $targetProjectProject); } // [END vmmigration_v1_generated_VmMigration_CreateTargetProject_sync] diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_disk_migration_job.php b/VmMigration/samples/V1/VmMigrationClient/delete_disk_migration_job.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_disk_migration_job.php rename to VmMigration/samples/V1/VmMigrationClient/delete_disk_migration_job.php diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_image_import.php b/VmMigration/samples/V1/VmMigrationClient/delete_image_import.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/delete_image_import.php rename to VmMigration/samples/V1/VmMigrationClient/delete_image_import.php diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/extend_migration.php b/VmMigration/samples/V1/VmMigrationClient/extend_migration.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/extend_migration.php rename to VmMigration/samples/V1/VmMigrationClient/extend_migration.php diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/fetch_storage_inventory.php b/VmMigration/samples/V1/VmMigrationClient/fetch_storage_inventory.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/fetch_storage_inventory.php rename to VmMigration/samples/V1/VmMigrationClient/fetch_storage_inventory.php diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_disk_migration_job.php b/VmMigration/samples/V1/VmMigrationClient/get_disk_migration_job.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_disk_migration_job.php rename to VmMigration/samples/V1/VmMigrationClient/get_disk_migration_job.php diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_image_import.php b/VmMigration/samples/V1/VmMigrationClient/get_image_import.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_image_import.php rename to VmMigration/samples/V1/VmMigrationClient/get_image_import.php diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_image_import_job.php b/VmMigration/samples/V1/VmMigrationClient/get_image_import_job.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/get_image_import_job.php rename to VmMigration/samples/V1/VmMigrationClient/get_image_import_job.php diff --git a/VmMigration/samples/V1/VmMigrationClient/list_clone_jobs.php b/VmMigration/samples/V1/VmMigrationClient/list_clone_jobs.php index 78172d4e1e1a..76b59b90ef2c 100644 --- a/VmMigration/samples/V1/VmMigrationClient/list_clone_jobs.php +++ b/VmMigration/samples/V1/VmMigrationClient/list_clone_jobs.php @@ -30,7 +30,8 @@ use Google\Cloud\VMMigration\V1\ListCloneJobsRequest; /** - * Lists CloneJobs of a given migrating VM. + * Lists the CloneJobs of a migrating VM. Only 25 most recent CloneJobs are + * listed. * * @param string $formattedParent The parent, which owns this collection of source VMs. Please see * {@see VmMigrationClient::migratingVmName()} for help formatting this field. diff --git a/VmMigration/samples/V1/VmMigrationClient/list_cutover_jobs.php b/VmMigration/samples/V1/VmMigrationClient/list_cutover_jobs.php index 1eb3ebbd189d..7ff33341e57a 100644 --- a/VmMigration/samples/V1/VmMigrationClient/list_cutover_jobs.php +++ b/VmMigration/samples/V1/VmMigrationClient/list_cutover_jobs.php @@ -30,7 +30,8 @@ use Google\Cloud\VMMigration\V1\ListCutoverJobsRequest; /** - * Lists CutoverJobs of a given migrating VM. + * Lists the CutoverJobs of a migrating VM. Only 25 most recent CutoverJobs + * are listed. * * @param string $formattedParent The parent, which owns this collection of migrating VMs. Please see * {@see VmMigrationClient::migratingVmName()} for help formatting this field. diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_disk_migration_jobs.php b/VmMigration/samples/V1/VmMigrationClient/list_disk_migration_jobs.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_disk_migration_jobs.php rename to VmMigration/samples/V1/VmMigrationClient/list_disk_migration_jobs.php diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_image_import_jobs.php b/VmMigration/samples/V1/VmMigrationClient/list_image_import_jobs.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_image_import_jobs.php rename to VmMigration/samples/V1/VmMigrationClient/list_image_import_jobs.php diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_image_imports.php b/VmMigration/samples/V1/VmMigrationClient/list_image_imports.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_image_imports.php rename to VmMigration/samples/V1/VmMigrationClient/list_image_imports.php diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/run_disk_migration_job.php b/VmMigration/samples/V1/VmMigrationClient/run_disk_migration_job.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/run_disk_migration_job.php rename to VmMigration/samples/V1/VmMigrationClient/run_disk_migration_job.php diff --git a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_disk_migration_job.php b/VmMigration/samples/V1/VmMigrationClient/update_disk_migration_job.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_disk_migration_job.php rename to VmMigration/samples/V1/VmMigrationClient/update_disk_migration_job.php diff --git a/VmMigration/samples/V1/VmMigrationClient/update_target_project.php b/VmMigration/samples/V1/VmMigrationClient/update_target_project.php index 28f20a611404..dc26476d581c 100644 --- a/VmMigration/samples/V1/VmMigrationClient/update_target_project.php +++ b/VmMigration/samples/V1/VmMigrationClient/update_target_project.php @@ -36,19 +36,16 @@ * NOTE: TargetProject is a global resource; hence the only supported value * for location is `global`. * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. + * @param string $targetProjectProject The target project ID (number) or project name. */ -function update_target_project_sample(): void +function update_target_project_sample(string $targetProjectProject): void { // Create a client. $vmMigrationClient = new VmMigrationClient(); // Prepare the request message. - $targetProject = new TargetProject(); + $targetProject = (new TargetProject()) + ->setProject($targetProjectProject); $request = (new UpdateTargetProjectRequest()) ->setTargetProject($targetProject); @@ -71,4 +68,20 @@ function update_target_project_sample(): void printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); } } + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $targetProjectProject = '[PROJECT]'; + + update_target_project_sample($targetProjectProject); +} // [END vmmigration_v1_generated_VmMigration_UpdateTargetProject_sync] diff --git a/VmMigration/src/V1/AvailableUpdates.php b/VmMigration/src/V1/AvailableUpdates.php index a32202170f8c..d46819537554 100644 --- a/VmMigration/src/V1/AvailableUpdates.php +++ b/VmMigration/src/V1/AvailableUpdates.php @@ -9,7 +9,7 @@ use Google\Protobuf\Internal\GPBUtil; /** - * Holds informatiom about the available versions for upgrade. + * Holds information about the available versions for upgrade. * * Generated from protobuf message google.cloud.vmmigration.v1.AvailableUpdates */ diff --git a/VmMigration/src/V1/AwsSourceDetails/AccessKeyCredentials.php b/VmMigration/src/V1/AwsSourceDetails/AccessKeyCredentials.php index 6833136f1cfb..713ef487f336 100644 --- a/VmMigration/src/V1/AwsSourceDetails/AccessKeyCredentials.php +++ b/VmMigration/src/V1/AwsSourceDetails/AccessKeyCredentials.php @@ -27,6 +27,14 @@ class AccessKeyCredentials extends \Google\Protobuf\Internal\Message * Generated from protobuf field string secret_access_key = 2 [(.google.api.field_behavior) = INPUT_ONLY]; */ protected $secret_access_key = ''; + /** + * Input only. AWS session token. + * Used only when AWS security token service (STS) is responsible for + * creating the temporary credentials. + * + * Generated from protobuf field string session_token = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $session_token = ''; /** * Constructor. @@ -38,6 +46,10 @@ class AccessKeyCredentials extends \Google\Protobuf\Internal\Message * AWS access key ID. * @type string $secret_access_key * Input only. AWS secret access key. + * @type string $session_token + * Input only. AWS session token. + * Used only when AWS security token service (STS) is responsible for + * creating the temporary credentials. * } */ public function __construct($data = NULL) { @@ -97,6 +109,36 @@ public function setSecretAccessKey($var) return $this; } + /** + * Input only. AWS session token. + * Used only when AWS security token service (STS) is responsible for + * creating the temporary credentials. + * + * Generated from protobuf field string session_token = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getSessionToken() + { + return $this->session_token; + } + + /** + * Input only. AWS session token. + * Used only when AWS security token service (STS) is responsible for + * creating the temporary credentials. + * + * Generated from protobuf field string session_token = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSessionToken($var) + { + GPBUtil::checkString($var, True); + $this->session_token = $var; + + return $this; + } + } diff --git a/VmMigration/src/V1/AwsSourceDetails/Tag.php b/VmMigration/src/V1/AwsSourceDetails/Tag.php index 2c366e5c7613..5bc1709e767a 100644 --- a/VmMigration/src/V1/AwsSourceDetails/Tag.php +++ b/VmMigration/src/V1/AwsSourceDetails/Tag.php @@ -16,15 +16,15 @@ class Tag extends \Google\Protobuf\Internal\Message { /** - * Key of tag. + * Required. Key of tag. * - * Generated from protobuf field string key = 1; + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; */ protected $key = ''; /** - * Value of tag. + * Required. Value of tag. * - * Generated from protobuf field string value = 2; + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; */ protected $value = ''; @@ -35,9 +35,9 @@ class Tag extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $key - * Key of tag. + * Required. Key of tag. * @type string $value - * Value of tag. + * Required. Value of tag. * } */ public function __construct($data = NULL) { @@ -46,9 +46,9 @@ public function __construct($data = NULL) { } /** - * Key of tag. + * Required. Key of tag. * - * Generated from protobuf field string key = 1; + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; * @return string */ public function getKey() @@ -57,9 +57,9 @@ public function getKey() } /** - * Key of tag. + * Required. Key of tag. * - * Generated from protobuf field string key = 1; + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; * @param string $var * @return $this */ @@ -72,9 +72,9 @@ public function setKey($var) } /** - * Value of tag. + * Required. Value of tag. * - * Generated from protobuf field string value = 2; + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; * @return string */ public function getValue() @@ -83,9 +83,9 @@ public function getValue() } /** - * Value of tag. + * Required. Value of tag. * - * Generated from protobuf field string value = 2; + * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; * @param string $var * @return $this */ diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDiskDetails.php b/VmMigration/src/V1/AwsSourceDiskDetails.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDiskDetails.php rename to VmMigration/src/V1/AwsSourceDiskDetails.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDiskDetails/Type.php b/VmMigration/src/V1/AwsSourceDiskDetails/Type.php similarity index 93% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDiskDetails/Type.php rename to VmMigration/src/V1/AwsSourceDiskDetails/Type.php index 45ee4d6215e3..a435952ad7b8 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDiskDetails/Type.php +++ b/VmMigration/src/V1/AwsSourceDiskDetails/Type.php @@ -94,6 +94,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Cloud\VMMigration\V1\AwsSourceDiskDetails_Type::class); diff --git a/VmMigration/src/V1/AwsSourceVmDetails.php b/VmMigration/src/V1/AwsSourceVmDetails.php index b8365eebfd4d..eaf005a088c3 100644 --- a/VmMigration/src/V1/AwsSourceVmDetails.php +++ b/VmMigration/src/V1/AwsSourceVmDetails.php @@ -16,17 +16,36 @@ class AwsSourceVmDetails extends \Google\Protobuf\Internal\Message { /** - * The firmware type of the source VM. + * Output only. The firmware type of the source VM. * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1; + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $firmware = 0; /** - * The total size of the disks being migrated in bytes. + * Output only. The total size of the disks being migrated in bytes. * - * Generated from protobuf field int64 committed_storage_bytes = 2; + * Generated from protobuf field int64 committed_storage_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $committed_storage_bytes = 0; + /** + * Output only. The disks attached to the source VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceVmDetails.AwsDiskDetails disks = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $disks; + /** + * Output only. Information about VM capabilities needed for some Compute + * Engine features. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmCapabilities vm_capabilities_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $vm_capabilities_info = null; + /** + * Output only. The VM architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmArchitecture architecture = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $architecture = 0; /** * Constructor. @@ -35,9 +54,16 @@ class AwsSourceVmDetails extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type int $firmware - * The firmware type of the source VM. + * Output only. The firmware type of the source VM. * @type int|string $committed_storage_bytes - * The total size of the disks being migrated in bytes. + * Output only. The total size of the disks being migrated in bytes. + * @type array<\Google\Cloud\VMMigration\V1\AwsSourceVmDetails\AwsDiskDetails>|\Google\Protobuf\Internal\RepeatedField $disks + * Output only. The disks attached to the source VM. + * @type \Google\Cloud\VMMigration\V1\VmCapabilities $vm_capabilities_info + * Output only. Information about VM capabilities needed for some Compute + * Engine features. + * @type int $architecture + * Output only. The VM architecture. * } */ public function __construct($data = NULL) { @@ -46,9 +72,9 @@ public function __construct($data = NULL) { } /** - * The firmware type of the source VM. + * Output only. The firmware type of the source VM. * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1; + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int */ public function getFirmware() @@ -57,9 +83,9 @@ public function getFirmware() } /** - * The firmware type of the source VM. + * Output only. The firmware type of the source VM. * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1; + * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int $var * @return $this */ @@ -72,9 +98,9 @@ public function setFirmware($var) } /** - * The total size of the disks being migrated in bytes. + * Output only. The total size of the disks being migrated in bytes. * - * Generated from protobuf field int64 committed_storage_bytes = 2; + * Generated from protobuf field int64 committed_storage_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return int|string */ public function getCommittedStorageBytes() @@ -83,9 +109,9 @@ public function getCommittedStorageBytes() } /** - * The total size of the disks being migrated in bytes. + * Output only. The total size of the disks being migrated in bytes. * - * Generated from protobuf field int64 committed_storage_bytes = 2; + * Generated from protobuf field int64 committed_storage_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param int|string $var * @return $this */ @@ -97,5 +123,95 @@ public function setCommittedStorageBytes($var) return $this; } + /** + * Output only. The disks attached to the source VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceVmDetails.AwsDiskDetails disks = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDisks() + { + return $this->disks; + } + + /** + * Output only. The disks attached to the source VM. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceVmDetails.AwsDiskDetails disks = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\AwsSourceVmDetails\AwsDiskDetails>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDisks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\AwsSourceVmDetails\AwsDiskDetails::class); + $this->disks = $arr; + + return $this; + } + + /** + * Output only. Information about VM capabilities needed for some Compute + * Engine features. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmCapabilities vm_capabilities_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\VmCapabilities|null + */ + public function getVmCapabilitiesInfo() + { + return $this->vm_capabilities_info; + } + + public function hasVmCapabilitiesInfo() + { + return isset($this->vm_capabilities_info); + } + + public function clearVmCapabilitiesInfo() + { + unset($this->vm_capabilities_info); + } + + /** + * Output only. Information about VM capabilities needed for some Compute + * Engine features. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmCapabilities vm_capabilities_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\VmCapabilities $var + * @return $this + */ + public function setVmCapabilitiesInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmCapabilities::class); + $this->vm_capabilities_info = $var; + + return $this; + } + + /** + * Output only. The VM architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmArchitecture architecture = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getArchitecture() + { + return $this->architecture; + } + + /** + * Output only. The VM architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmArchitecture architecture = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setArchitecture($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\VmArchitecture::class); + $this->architecture = $var; + + return $this; + } + } diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/AwsDiskDetails.php b/VmMigration/src/V1/AwsSourceVmDetails/AwsDiskDetails.php similarity index 95% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/AwsDiskDetails.php rename to VmMigration/src/V1/AwsSourceVmDetails/AwsDiskDetails.php index 5c19c501f63b..fd1ccb14b26a 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails/AwsDiskDetails.php +++ b/VmMigration/src/V1/AwsSourceVmDetails/AwsDiskDetails.php @@ -133,6 +133,4 @@ public function setSizeGb($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AwsDiskDetails::class, \Google\Cloud\VMMigration\V1\AwsSourceVmDetails_AwsDiskDetails::class); diff --git a/VmMigration/src/V1/AwsVmDetails.php b/VmMigration/src/V1/AwsVmDetails.php index 7535504cdd78..07d9150484c6 100644 --- a/VmMigration/src/V1/AwsVmDetails.php +++ b/VmMigration/src/V1/AwsVmDetails.php @@ -46,7 +46,7 @@ class AwsVmDetails extends \Google\Protobuf\Internal\Message */ protected $power_state = 0; /** - * The number of cpus the VM has. + * The number of CPU cores the VM has. * * Generated from protobuf field int32 cpu_count = 6; */ @@ -123,6 +123,13 @@ class AwsVmDetails extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.vmmigration.v1.AwsVmDetails.VmArchitecture architecture = 18; */ protected $architecture = 0; + /** + * The number of vCPUs the VM has. It is calculated as the + * number of CPU cores * threads per CPU the VM has. + * + * Generated from protobuf field int32 vcpu_count = 19; + */ + protected $vcpu_count = 0; /** * Constructor. @@ -141,7 +148,7 @@ class AwsVmDetails extends \Google\Protobuf\Internal\Message * @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. + * The number of CPU cores the VM has. * @type int $memory_mb * The memory size of the VM in MB. * @type int $disk_count @@ -166,6 +173,9 @@ class AwsVmDetails extends \Google\Protobuf\Internal\Message * The virtualization type. * @type int $architecture * The CPU architecture. + * @type int $vcpu_count + * The number of vCPUs the VM has. It is calculated as the + * number of CPU cores * threads per CPU the VM has. * } */ public function __construct($data = NULL) { @@ -304,7 +314,7 @@ public function setPowerState($var) } /** - * The number of cpus the VM has. + * The number of CPU cores the VM has. * * Generated from protobuf field int32 cpu_count = 6; * @return int @@ -315,7 +325,7 @@ public function getCpuCount() } /** - * The number of cpus the VM has. + * The number of CPU cores the VM has. * * Generated from protobuf field int32 cpu_count = 6; * @param int $var @@ -641,5 +651,33 @@ public function setArchitecture($var) return $this; } + /** + * The number of vCPUs the VM has. It is calculated as the + * number of CPU cores * threads per CPU the VM has. + * + * Generated from protobuf field int32 vcpu_count = 19; + * @return int + */ + public function getVcpuCount() + { + return $this->vcpu_count; + } + + /** + * The number of vCPUs the VM has. It is calculated as the + * number of CPU cores * threads per CPU the VM has. + * + * Generated from protobuf field int32 vcpu_count = 19; + * @param int $var + * @return $this + */ + public function setVcpuCount($var) + { + GPBUtil::checkInt32($var); + $this->vcpu_count = $var; + + return $this; + } + } diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceDetails.php b/VmMigration/src/V1/AzureSourceDetails.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceDetails.php rename to VmMigration/src/V1/AzureSourceDetails.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceDetails/ClientSecretCredentials.php b/VmMigration/src/V1/AzureSourceDetails/ClientSecretCredentials.php similarity index 94% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceDetails/ClientSecretCredentials.php rename to VmMigration/src/V1/AzureSourceDetails/ClientSecretCredentials.php index 28017bd20113..6d0624410363 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceDetails/ClientSecretCredentials.php +++ b/VmMigration/src/V1/AzureSourceDetails/ClientSecretCredentials.php @@ -133,6 +133,4 @@ public function setClientSecret($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ClientSecretCredentials::class, \Google\Cloud\VMMigration\V1\AzureSourceDetails_ClientSecretCredentials::class); diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceDetails/State.php b/VmMigration/src/V1/AzureSourceDetails/State.php similarity index 92% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceDetails/State.php rename to VmMigration/src/V1/AzureSourceDetails/State.php index 5986ac5ed1c4..a95f7d5c4b06 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceDetails/State.php +++ b/VmMigration/src/V1/AzureSourceDetails/State.php @@ -69,6 +69,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VMMigration\V1\AzureSourceDetails_State::class); diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceVmDetails.php b/VmMigration/src/V1/AzureSourceVmDetails.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceVmDetails.php rename to VmMigration/src/V1/AzureSourceVmDetails.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceVmDetails/AzureDiskDetails.php b/VmMigration/src/V1/AzureSourceVmDetails/AzureDiskDetails.php similarity index 94% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceVmDetails/AzureDiskDetails.php rename to VmMigration/src/V1/AzureSourceVmDetails/AzureDiskDetails.php index 30f74eab3b05..fb9899f2118d 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceVmDetails/AzureDiskDetails.php +++ b/VmMigration/src/V1/AzureSourceVmDetails/AzureDiskDetails.php @@ -133,6 +133,4 @@ public function setSizeGb($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AzureDiskDetails::class, \Google\Cloud\VMMigration\V1\AzureSourceVmDetails_AzureDiskDetails::class); diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceVmDetails/Firmware.php b/VmMigration/src/V1/AzureSourceVmDetails/Firmware.php similarity index 89% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceVmDetails/Firmware.php rename to VmMigration/src/V1/AzureSourceVmDetails/Firmware.php index b2e24c8837d8..3b5439b309ed 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureSourceVmDetails/Firmware.php +++ b/VmMigration/src/V1/AzureSourceVmDetails/Firmware.php @@ -59,6 +59,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Firmware::class, \Google\Cloud\VMMigration\V1\AzureSourceVmDetails_Firmware::class); diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails.php b/VmMigration/src/V1/AzureVmDetails.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails.php rename to VmMigration/src/V1/AzureVmDetails.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/BootOption.php b/VmMigration/src/V1/AzureVmDetails/BootOption.php similarity index 90% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/BootOption.php rename to VmMigration/src/V1/AzureVmDetails/BootOption.php index 32f00b38413d..d923fa9c3289 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/BootOption.php +++ b/VmMigration/src/V1/AzureVmDetails/BootOption.php @@ -59,6 +59,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BootOption::class, \Google\Cloud\VMMigration\V1\AzureVmDetails_BootOption::class); diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/Disk.php b/VmMigration/src/V1/AzureVmDetails/Disk.php similarity index 94% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/Disk.php rename to VmMigration/src/V1/AzureVmDetails/Disk.php index 92d7ad3f35dc..952ebfa93769 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/Disk.php +++ b/VmMigration/src/V1/AzureVmDetails/Disk.php @@ -133,6 +133,4 @@ public function setLun($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Disk::class, \Google\Cloud\VMMigration\V1\AzureVmDetails_Disk::class); diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/OSDescription.php b/VmMigration/src/V1/AzureVmDetails/OSDescription.php similarity index 95% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/OSDescription.php rename to VmMigration/src/V1/AzureVmDetails/OSDescription.php index 4434e01a855e..8cb31e2317af 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/OSDescription.php +++ b/VmMigration/src/V1/AzureVmDetails/OSDescription.php @@ -168,6 +168,4 @@ public function setPlan($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OSDescription::class, \Google\Cloud\VMMigration\V1\AzureVmDetails_OSDescription::class); diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/OSDisk.php b/VmMigration/src/V1/AzureVmDetails/OSDisk.php similarity index 94% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/OSDisk.php rename to VmMigration/src/V1/AzureVmDetails/OSDisk.php index 1dbc16b50bdb..1d87ef59fd31 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/OSDisk.php +++ b/VmMigration/src/V1/AzureVmDetails/OSDisk.php @@ -133,6 +133,4 @@ public function setSizeGb($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OSDisk::class, \Google\Cloud\VMMigration\V1\AzureVmDetails_OSDisk::class); diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/PowerState.php b/VmMigration/src/V1/AzureVmDetails/PowerState.php similarity index 93% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/PowerState.php rename to VmMigration/src/V1/AzureVmDetails/PowerState.php index ee188d5f2504..b9e846a9305f 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/PowerState.php +++ b/VmMigration/src/V1/AzureVmDetails/PowerState.php @@ -94,6 +94,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PowerState::class, \Google\Cloud\VMMigration\V1\AzureVmDetails_PowerState::class); diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/VmArchitecture.php b/VmMigration/src/V1/AzureVmDetails/VmArchitecture.php similarity index 90% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/VmArchitecture.php rename to VmMigration/src/V1/AzureVmDetails/VmArchitecture.php index c2c41b9a0a0a..2268673ce8c2 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmDetails/VmArchitecture.php +++ b/VmMigration/src/V1/AzureVmDetails/VmArchitecture.php @@ -59,6 +59,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VmArchitecture::class, \Google\Cloud\VMMigration\V1\AzureVmDetails_VmArchitecture::class); diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmsDetails.php b/VmMigration/src/V1/AzureVmsDetails.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AzureVmsDetails.php rename to VmMigration/src/V1/AzureVmsDetails.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/BootConversion.php b/VmMigration/src/V1/BootConversion.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/BootConversion.php rename to VmMigration/src/V1/BootConversion.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/BootDiskDefaults.php b/VmMigration/src/V1/BootDiskDefaults.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/BootDiskDefaults.php rename to VmMigration/src/V1/BootDiskDefaults.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/BootDiskDefaults/DiskImageDefaults.php b/VmMigration/src/V1/BootDiskDefaults/DiskImageDefaults.php similarity index 91% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/BootDiskDefaults/DiskImageDefaults.php rename to VmMigration/src/V1/BootDiskDefaults/DiskImageDefaults.php index 40ea54e2b07a..49df77d44a7d 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/BootDiskDefaults/DiskImageDefaults.php +++ b/VmMigration/src/V1/BootDiskDefaults/DiskImageDefaults.php @@ -65,6 +65,4 @@ public function setSourceImage($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DiskImageDefaults::class, \Google\Cloud\VMMigration\V1\BootDiskDefaults_DiskImageDefaults::class); diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelDiskMigrationJobRequest.php b/VmMigration/src/V1/CancelDiskMigrationJobRequest.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelDiskMigrationJobRequest.php rename to VmMigration/src/V1/CancelDiskMigrationJobRequest.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelDiskMigrationJobResponse.php b/VmMigration/src/V1/CancelDiskMigrationJobResponse.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelDiskMigrationJobResponse.php rename to VmMigration/src/V1/CancelDiskMigrationJobResponse.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelImageImportJobRequest.php b/VmMigration/src/V1/CancelImageImportJobRequest.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelImageImportJobRequest.php rename to VmMigration/src/V1/CancelImageImportJobRequest.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelImageImportJobResponse.php b/VmMigration/src/V1/CancelImageImportJobResponse.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CancelImageImportJobResponse.php rename to VmMigration/src/V1/CancelImageImportJobResponse.php diff --git a/VmMigration/src/V1/Client/VmMigrationClient.php b/VmMigration/src/V1/Client/VmMigrationClient.php index d1054cffa28d..0e542912efb8 100644 --- a/VmMigration/src/V1/Client/VmMigrationClient.php +++ b/VmMigration/src/V1/Client/VmMigrationClient.php @@ -40,11 +40,15 @@ use Google\Cloud\VMMigration\V1\AddGroupMigrationRequest; use Google\Cloud\VMMigration\V1\CancelCloneJobRequest; use Google\Cloud\VMMigration\V1\CancelCutoverJobRequest; +use Google\Cloud\VMMigration\V1\CancelDiskMigrationJobRequest; +use Google\Cloud\VMMigration\V1\CancelImageImportJobRequest; use Google\Cloud\VMMigration\V1\CloneJob; use Google\Cloud\VMMigration\V1\CreateCloneJobRequest; use Google\Cloud\VMMigration\V1\CreateCutoverJobRequest; use Google\Cloud\VMMigration\V1\CreateDatacenterConnectorRequest; +use Google\Cloud\VMMigration\V1\CreateDiskMigrationJobRequest; use Google\Cloud\VMMigration\V1\CreateGroupRequest; +use Google\Cloud\VMMigration\V1\CreateImageImportRequest; use Google\Cloud\VMMigration\V1\CreateMigratingVmRequest; use Google\Cloud\VMMigration\V1\CreateSourceRequest; use Google\Cloud\VMMigration\V1\CreateTargetProjectRequest; @@ -52,28 +56,41 @@ use Google\Cloud\VMMigration\V1\CutoverJob; use Google\Cloud\VMMigration\V1\DatacenterConnector; use Google\Cloud\VMMigration\V1\DeleteDatacenterConnectorRequest; +use Google\Cloud\VMMigration\V1\DeleteDiskMigrationJobRequest; use Google\Cloud\VMMigration\V1\DeleteGroupRequest; +use Google\Cloud\VMMigration\V1\DeleteImageImportRequest; use Google\Cloud\VMMigration\V1\DeleteMigratingVmRequest; use Google\Cloud\VMMigration\V1\DeleteSourceRequest; use Google\Cloud\VMMigration\V1\DeleteTargetProjectRequest; use Google\Cloud\VMMigration\V1\DeleteUtilizationReportRequest; +use Google\Cloud\VMMigration\V1\DiskMigrationJob; +use Google\Cloud\VMMigration\V1\ExtendMigrationRequest; use Google\Cloud\VMMigration\V1\FetchInventoryRequest; use Google\Cloud\VMMigration\V1\FetchInventoryResponse; +use Google\Cloud\VMMigration\V1\FetchStorageInventoryRequest; use Google\Cloud\VMMigration\V1\FinalizeMigrationRequest; use Google\Cloud\VMMigration\V1\GetCloneJobRequest; use Google\Cloud\VMMigration\V1\GetCutoverJobRequest; use Google\Cloud\VMMigration\V1\GetDatacenterConnectorRequest; +use Google\Cloud\VMMigration\V1\GetDiskMigrationJobRequest; use Google\Cloud\VMMigration\V1\GetGroupRequest; +use Google\Cloud\VMMigration\V1\GetImageImportJobRequest; +use Google\Cloud\VMMigration\V1\GetImageImportRequest; use Google\Cloud\VMMigration\V1\GetMigratingVmRequest; use Google\Cloud\VMMigration\V1\GetReplicationCycleRequest; use Google\Cloud\VMMigration\V1\GetSourceRequest; use Google\Cloud\VMMigration\V1\GetTargetProjectRequest; use Google\Cloud\VMMigration\V1\GetUtilizationReportRequest; use Google\Cloud\VMMigration\V1\Group; +use Google\Cloud\VMMigration\V1\ImageImport; +use Google\Cloud\VMMigration\V1\ImageImportJob; use Google\Cloud\VMMigration\V1\ListCloneJobsRequest; use Google\Cloud\VMMigration\V1\ListCutoverJobsRequest; use Google\Cloud\VMMigration\V1\ListDatacenterConnectorsRequest; +use Google\Cloud\VMMigration\V1\ListDiskMigrationJobsRequest; use Google\Cloud\VMMigration\V1\ListGroupsRequest; +use Google\Cloud\VMMigration\V1\ListImageImportJobsRequest; +use Google\Cloud\VMMigration\V1\ListImageImportsRequest; use Google\Cloud\VMMigration\V1\ListMigratingVmsRequest; use Google\Cloud\VMMigration\V1\ListReplicationCyclesRequest; use Google\Cloud\VMMigration\V1\ListSourcesRequest; @@ -84,9 +101,11 @@ use Google\Cloud\VMMigration\V1\RemoveGroupMigrationRequest; use Google\Cloud\VMMigration\V1\ReplicationCycle; use Google\Cloud\VMMigration\V1\ResumeMigrationRequest; +use Google\Cloud\VMMigration\V1\RunDiskMigrationJobRequest; use Google\Cloud\VMMigration\V1\Source; use Google\Cloud\VMMigration\V1\StartMigrationRequest; use Google\Cloud\VMMigration\V1\TargetProject; +use Google\Cloud\VMMigration\V1\UpdateDiskMigrationJobRequest; use Google\Cloud\VMMigration\V1\UpdateGroupRequest; use Google\Cloud\VMMigration\V1\UpdateMigratingVmRequest; use Google\Cloud\VMMigration\V1\UpdateSourceRequest; @@ -112,26 +131,37 @@ * @method PromiseInterface addGroupMigrationAsync(AddGroupMigrationRequest $request, array $optionalArgs = []) * @method PromiseInterface cancelCloneJobAsync(CancelCloneJobRequest $request, array $optionalArgs = []) * @method PromiseInterface cancelCutoverJobAsync(CancelCutoverJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface cancelDiskMigrationJobAsync(CancelDiskMigrationJobRequest $request, array $optionalArgs = []) + * @method PromiseInterface cancelImageImportJobAsync(CancelImageImportJobRequest $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 createDiskMigrationJobAsync(CreateDiskMigrationJobRequest $request, array $optionalArgs = []) * @method PromiseInterface createGroupAsync(CreateGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface createImageImportAsync(CreateImageImportRequest $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 deleteDiskMigrationJobAsync(DeleteDiskMigrationJobRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteGroupAsync(DeleteGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteImageImportAsync(DeleteImageImportRequest $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 extendMigrationAsync(ExtendMigrationRequest $request, array $optionalArgs = []) * @method PromiseInterface fetchInventoryAsync(FetchInventoryRequest $request, array $optionalArgs = []) + * @method PromiseInterface fetchStorageInventoryAsync(FetchStorageInventoryRequest $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 getDiskMigrationJobAsync(GetDiskMigrationJobRequest $request, array $optionalArgs = []) * @method PromiseInterface getGroupAsync(GetGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getImageImportAsync(GetImageImportRequest $request, array $optionalArgs = []) + * @method PromiseInterface getImageImportJobAsync(GetImageImportJobRequest $request, array $optionalArgs = []) * @method PromiseInterface getMigratingVmAsync(GetMigratingVmRequest $request, array $optionalArgs = []) * @method PromiseInterface getReplicationCycleAsync(GetReplicationCycleRequest $request, array $optionalArgs = []) * @method PromiseInterface getSourceAsync(GetSourceRequest $request, array $optionalArgs = []) @@ -140,7 +170,10 @@ * @method PromiseInterface listCloneJobsAsync(ListCloneJobsRequest $request, array $optionalArgs = []) * @method PromiseInterface listCutoverJobsAsync(ListCutoverJobsRequest $request, array $optionalArgs = []) * @method PromiseInterface listDatacenterConnectorsAsync(ListDatacenterConnectorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDiskMigrationJobsAsync(ListDiskMigrationJobsRequest $request, array $optionalArgs = []) * @method PromiseInterface listGroupsAsync(ListGroupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listImageImportJobsAsync(ListImageImportJobsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listImageImportsAsync(ListImageImportsRequest $request, array $optionalArgs = []) * @method PromiseInterface listMigratingVmsAsync(ListMigratingVmsRequest $request, array $optionalArgs = []) * @method PromiseInterface listReplicationCyclesAsync(ListReplicationCyclesRequest $request, array $optionalArgs = []) * @method PromiseInterface listSourcesAsync(ListSourcesRequest $request, array $optionalArgs = []) @@ -149,7 +182,9 @@ * @method PromiseInterface pauseMigrationAsync(PauseMigrationRequest $request, array $optionalArgs = []) * @method PromiseInterface removeGroupMigrationAsync(RemoveGroupMigrationRequest $request, array $optionalArgs = []) * @method PromiseInterface resumeMigrationAsync(ResumeMigrationRequest $request, array $optionalArgs = []) + * @method PromiseInterface runDiskMigrationJobAsync(RunDiskMigrationJobRequest $request, array $optionalArgs = []) * @method PromiseInterface startMigrationAsync(StartMigrationRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDiskMigrationJobAsync(UpdateDiskMigrationJobRequest $request, array $optionalArgs = []) * @method PromiseInterface updateGroupAsync(UpdateGroupRequest $request, array $optionalArgs = []) * @method PromiseInterface updateMigratingVmAsync(UpdateMigratingVmRequest $request, array $optionalArgs = []) * @method PromiseInterface updateSourceAsync(UpdateSourceRequest $request, array $optionalArgs = []) @@ -284,6 +319,27 @@ public static function cloneJobName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a crypto_key + * resource. + * + * @param string $project + * @param string $location + * @param string $keyRing + * @param string $cryptoKey + * + * @return string The formatted crypto_key resource. + */ + public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string + { + return self::getPathTemplate('cryptoKey')->render([ + 'project' => $project, + 'location' => $location, + 'key_ring' => $keyRing, + 'crypto_key' => $cryptoKey, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a cutover_job * resource. @@ -337,6 +393,31 @@ public static function datacenterConnectorName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * disk_migration_job resource. + * + * @param string $project + * @param string $location + * @param string $source + * @param string $diskMigrationJob + * + * @return string The formatted disk_migration_job resource. + */ + public static function diskMigrationJobName( + string $project, + string $location, + string $source, + string $diskMigrationJob + ): string { + return self::getPathTemplate('diskMigrationJob')->render([ + 'project' => $project, + 'location' => $location, + 'source' => $source, + 'disk_migration_job' => $diskMigrationJob, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a group * resource. @@ -356,6 +437,63 @@ public static function groupName(string $project, string $location, string $grou ]); } + /** + * Formats a string containing the fully-qualified path to represent a image + * resource. + * + * @param string $project + * @param string $image + * + * @return string The formatted image resource. + */ + public static function imageName(string $project, string $image): string + { + return self::getPathTemplate('image')->render([ + 'project' => $project, + 'image' => $image, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a image_import + * resource. + * + * @param string $project + * @param string $location + * @param string $job + * + * @return string The formatted image_import resource. + */ + public static function imageImportName(string $project, string $location, string $job): string + { + return self::getPathTemplate('imageImport')->render([ + 'project' => $project, + 'location' => $location, + 'job' => $job, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * image_import_job resource. + * + * @param string $project + * @param string $location + * @param string $job + * @param string $result + * + * @return string The formatted image_import_job resource. + */ + public static function imageImportJobName(string $project, string $location, string $job, string $result): string + { + return self::getPathTemplate('imageImportJob')->render([ + 'project' => $project, + 'location' => $location, + 'job' => $job, + 'result' => $result, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a location * resource. @@ -426,6 +564,23 @@ public static function replicationCycleName( ]); } + /** + * Formats a string containing the fully-qualified path to represent a + * service_account resource. + * + * @param string $project + * @param string $serviceAccount + * + * @return string The formatted service_account resource. + */ + public static function serviceAccountName(string $project, string $serviceAccount): string + { + return self::getPathTemplate('serviceAccount')->render([ + 'project' => $project, + 'service_account' => $serviceAccount, + ]); + } + /** * Formats a string containing the fully-qualified path to represent a source * resource. @@ -494,12 +649,18 @@ public static function utilizationReportName( * The following name formats are supported: * Template: Pattern * - cloneJob: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cloneJobs/{clone_job} + * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} * - cutoverJob: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job} * - datacenterConnector: projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector} + * - diskMigrationJob: projects/{project}/locations/{location}/sources/{source}/diskMigrationJobs/{disk_migration_job} * - group: projects/{project}/locations/{location}/groups/{group} + * - image: projects/{project}/global/images/{image} + * - imageImport: projects/{project}/locations/{location}/imageImports/{job} + * - imageImportJob: projects/{project}/locations/{location}/imageImports/{job}/imageImportJobs/{result} * - 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} + * - serviceAccount: projects/{project}/serviceAccounts/{service_account} * - 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} @@ -681,6 +842,62 @@ public function cancelCutoverJob(CancelCutoverJobRequest $request, array $callOp return $this->startApiCall('CancelCutoverJob', $request, $callOptions)->wait(); } + /** + * Cancels the disk migration job. + * + * The async variant is {@see VmMigrationClient::cancelDiskMigrationJobAsync()} . + * + * @example samples/V1/VmMigrationClient/cancel_disk_migration_job.php + * + * @param CancelDiskMigrationJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function cancelDiskMigrationJob( + CancelDiskMigrationJobRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('CancelDiskMigrationJob', $request, $callOptions)->wait(); + } + + /** + * Initiates the cancellation of a running clone job. + * + * The async variant is {@see VmMigrationClient::cancelImageImportJobAsync()} . + * + * @example samples/V1/VmMigrationClient/cancel_image_import_job.php + * + * @param CancelImageImportJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function cancelImageImportJob( + CancelImageImportJobRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('CancelImageImportJob', $request, $callOptions)->wait(); + } + /** * Initiates a Clone of a specific migrating VM. * @@ -764,6 +981,34 @@ public function createDatacenterConnector( return $this->startApiCall('CreateDatacenterConnector', $request, $callOptions)->wait(); } + /** + * Creates a new disk migration job in a given Source. + * + * The async variant is {@see VmMigrationClient::createDiskMigrationJobAsync()} . + * + * @example samples/V1/VmMigrationClient/create_disk_migration_job.php + * + * @param CreateDiskMigrationJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createDiskMigrationJob( + CreateDiskMigrationJobRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('CreateDiskMigrationJob', $request, $callOptions)->wait(); + } + /** * Creates a new Group in a given project and location. * @@ -790,6 +1035,32 @@ public function createGroup(CreateGroupRequest $request, array $callOptions = [] return $this->startApiCall('CreateGroup', $request, $callOptions)->wait(); } + /** + * Creates a new ImageImport in a given project. + * + * The async variant is {@see VmMigrationClient::createImageImportAsync()} . + * + * @example samples/V1/VmMigrationClient/create_image_import.php + * + * @param CreateImageImportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createImageImport(CreateImageImportRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateImageImport', $request, $callOptions)->wait(); + } + /** * Creates a new MigratingVm in a given Source. * @@ -928,6 +1199,34 @@ public function deleteDatacenterConnector( return $this->startApiCall('DeleteDatacenterConnector', $request, $callOptions)->wait(); } + /** + * Deletes a single DiskMigrationJob. + * + * The async variant is {@see VmMigrationClient::deleteDiskMigrationJobAsync()} . + * + * @example samples/V1/VmMigrationClient/delete_disk_migration_job.php + * + * @param DeleteDiskMigrationJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteDiskMigrationJob( + DeleteDiskMigrationJobRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('DeleteDiskMigrationJob', $request, $callOptions)->wait(); + } + /** * Deletes a single Group. * @@ -954,6 +1253,32 @@ public function deleteGroup(DeleteGroupRequest $request, array $callOptions = [] return $this->startApiCall('DeleteGroup', $request, $callOptions)->wait(); } + /** + * Deletes a single ImageImport. + * + * The async variant is {@see VmMigrationClient::deleteImageImportAsync()} . + * + * @example samples/V1/VmMigrationClient/delete_image_import.php + * + * @param DeleteImageImportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteImageImport(DeleteImageImportRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteImageImport', $request, $callOptions)->wait(); + } + /** * Deletes a single MigratingVm. * @@ -1063,6 +1388,32 @@ public function deleteUtilizationReport( return $this->startApiCall('DeleteUtilizationReport', $request, $callOptions)->wait(); } + /** + * Extend the migrating VM time to live. + * + * The async variant is {@see VmMigrationClient::extendMigrationAsync()} . + * + * @example samples/V1/VmMigrationClient/extend_migration.php + * + * @param ExtendMigrationRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function extendMigration(ExtendMigrationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ExtendMigration', $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 @@ -1093,6 +1444,39 @@ public function fetchInventory(FetchInventoryRequest $request, array $callOption return $this->startApiCall('FetchInventory', $request, $callOptions)->wait(); } + /** + * List remote source's inventory of storage resources. + * The remote source is another cloud vendor (e.g. AWS, Azure). + * The inventory describes the list of existing storage resources in that + * source. Note that this operation lists the resources on the remote source, + * as opposed to listing the MigratingVms resources in the vmmigration + * service. + * + * The async variant is {@see VmMigrationClient::fetchStorageInventoryAsync()} . + * + * @example samples/V1/VmMigrationClient/fetch_storage_inventory.php + * + * @param FetchStorageInventoryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function fetchStorageInventory( + FetchStorageInventoryRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('FetchStorageInventory', $request, $callOptions); + } + /** * Marks a migration as completed, deleting migration resources that are no * longer being used. Only applicable after cutover is done. @@ -1200,6 +1584,32 @@ public function getDatacenterConnector( return $this->startApiCall('GetDatacenterConnector', $request, $callOptions)->wait(); } + /** + * Gets details of a single DiskMigrationJob. + * + * The async variant is {@see VmMigrationClient::getDiskMigrationJobAsync()} . + * + * @example samples/V1/VmMigrationClient/get_disk_migration_job.php + * + * @param GetDiskMigrationJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return DiskMigrationJob + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDiskMigrationJob(GetDiskMigrationJobRequest $request, array $callOptions = []): DiskMigrationJob + { + return $this->startApiCall('GetDiskMigrationJob', $request, $callOptions)->wait(); + } + /** * Gets details of a single Group. * @@ -1226,6 +1636,58 @@ public function getGroup(GetGroupRequest $request, array $callOptions = []): Gro return $this->startApiCall('GetGroup', $request, $callOptions)->wait(); } + /** + * Gets details of a single ImageImport. + * + * The async variant is {@see VmMigrationClient::getImageImportAsync()} . + * + * @example samples/V1/VmMigrationClient/get_image_import.php + * + * @param GetImageImportRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ImageImport + * + * @throws ApiException Thrown if the API call fails. + */ + public function getImageImport(GetImageImportRequest $request, array $callOptions = []): ImageImport + { + return $this->startApiCall('GetImageImport', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single ImageImportJob. + * + * The async variant is {@see VmMigrationClient::getImageImportJobAsync()} . + * + * @example samples/V1/VmMigrationClient/get_image_import_job.php + * + * @param GetImageImportJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ImageImportJob + * + * @throws ApiException Thrown if the API call fails. + */ + public function getImageImportJob(GetImageImportJobRequest $request, array $callOptions = []): ImageImportJob + { + return $this->startApiCall('GetImageImportJob', $request, $callOptions)->wait(); + } + /** * Gets details of a single MigratingVm. * @@ -1362,7 +1824,8 @@ public function getUtilizationReport( } /** - * Lists CloneJobs of a given migrating VM. + * Lists the CloneJobs of a migrating VM. Only 25 most recent CloneJobs are + * listed. * * The async variant is {@see VmMigrationClient::listCloneJobsAsync()} . * @@ -1388,7 +1851,8 @@ public function listCloneJobs(ListCloneJobsRequest $request, array $callOptions } /** - * Lists CutoverJobs of a given migrating VM. + * Lists the CutoverJobs of a migrating VM. Only 25 most recent CutoverJobs + * are listed. * * The async variant is {@see VmMigrationClient::listCutoverJobsAsync()} . * @@ -1441,6 +1905,34 @@ public function listDatacenterConnectors( return $this->startApiCall('ListDatacenterConnectors', $request, $callOptions); } + /** + * Lists DiskMigrationJobs in a given Source. + * + * The async variant is {@see VmMigrationClient::listDiskMigrationJobsAsync()} . + * + * @example samples/V1/VmMigrationClient/list_disk_migration_jobs.php + * + * @param ListDiskMigrationJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listDiskMigrationJobs( + ListDiskMigrationJobsRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListDiskMigrationJobs', $request, $callOptions); + } + /** * Lists Groups in a given project and location. * @@ -1467,6 +1959,58 @@ public function listGroups(ListGroupsRequest $request, array $callOptions = []): return $this->startApiCall('ListGroups', $request, $callOptions); } + /** + * Lists ImageImportJobs in a given project. + * + * The async variant is {@see VmMigrationClient::listImageImportJobsAsync()} . + * + * @example samples/V1/VmMigrationClient/list_image_import_jobs.php + * + * @param ListImageImportJobsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listImageImportJobs(ListImageImportJobsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListImageImportJobs', $request, $callOptions); + } + + /** + * Lists ImageImports in a given project. + * + * The async variant is {@see VmMigrationClient::listImageImportsAsync()} . + * + * @example samples/V1/VmMigrationClient/list_image_imports.php + * + * @param ListImageImportsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listImageImports(ListImageImportsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListImageImports', $request, $callOptions); + } + /** * Lists MigratingVms in a given Source. * @@ -1689,6 +2233,32 @@ public function resumeMigration(ResumeMigrationRequest $request, array $callOpti return $this->startApiCall('ResumeMigration', $request, $callOptions)->wait(); } + /** + * Runs the disk migration job. + * + * The async variant is {@see VmMigrationClient::runDiskMigrationJobAsync()} . + * + * @example samples/V1/VmMigrationClient/run_disk_migration_job.php + * + * @param RunDiskMigrationJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function runDiskMigrationJob(RunDiskMigrationJobRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RunDiskMigrationJob', $request, $callOptions)->wait(); + } + /** * Starts migration for a VM. Starts the process of uploading * data and creating snapshots, in replication cycles scheduled by the policy. @@ -1716,6 +2286,34 @@ public function startMigration(StartMigrationRequest $request, array $callOption return $this->startApiCall('StartMigration', $request, $callOptions)->wait(); } + /** + * Updates the parameters of a single DiskMigrationJob. + * + * The async variant is {@see VmMigrationClient::updateDiskMigrationJobAsync()} . + * + * @example samples/V1/VmMigrationClient/update_disk_migration_job.php + * + * @param UpdateDiskMigrationJobRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateDiskMigrationJob( + UpdateDiskMigrationJobRequest $request, + array $callOptions = [] + ): OperationResponse { + return $this->startApiCall('UpdateDiskMigrationJob', $request, $callOptions)->wait(); + } + /** * Updates the parameters of a single Group. * diff --git a/VmMigration/src/V1/CloneJob.php b/VmMigration/src/V1/CloneJob.php index dd34db7de2c9..bf8700fea7bc 100644 --- a/VmMigration/src/V1/CloneJob.php +++ b/VmMigration/src/V1/CloneJob.php @@ -78,6 +78,8 @@ class CloneJob extends \Google\Protobuf\Internal\Message * * @type \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails $compute_engine_target_details * Output only. Details of the target VM in Compute Engine. + * @type \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails $compute_engine_disks_target_details + * Output only. Details of the target Persistent Disks 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). @@ -132,6 +134,37 @@ public function setComputeEngineTargetDetails($var) return $this; } + /** + * Output only. Details of the target Persistent Disks in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDisksTargetDetails compute_engine_disks_target_details = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails|null + */ + public function getComputeEngineDisksTargetDetails() + { + return $this->readOneof(25); + } + + public function hasComputeEngineDisksTargetDetails() + { + return $this->hasOneof(25); + } + + /** + * Output only. Details of the target Persistent Disks in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDisksTargetDetails compute_engine_disks_target_details = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails $var + * @return $this + */ + public function setComputeEngineDisksTargetDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails::class); + $this->writeOneof(25, $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). diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDisk.php b/VmMigration/src/V1/ComputeEngineDisk.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDisk.php rename to VmMigration/src/V1/ComputeEngineDisk.php diff --git a/VmMigration/src/V1/ComputeEngineDiskType.php b/VmMigration/src/V1/ComputeEngineDiskType.php index 6dd7104b8f4d..4126616e99b2 100644 --- a/VmMigration/src/V1/ComputeEngineDiskType.php +++ b/VmMigration/src/V1/ComputeEngineDiskType.php @@ -38,12 +38,19 @@ class ComputeEngineDiskType * Generated from protobuf enum COMPUTE_ENGINE_DISK_TYPE_BALANCED = 3; */ const COMPUTE_ENGINE_DISK_TYPE_BALANCED = 3; + /** + * Hyperdisk balanced disk type. + * + * Generated from protobuf enum COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED = 4; + */ + const COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED = 4; 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', + self::COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED => 'COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED', ]; public static function name($value) diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDisksTargetDefaults.php b/VmMigration/src/V1/ComputeEngineDisksTargetDefaults.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDisksTargetDefaults.php rename to VmMigration/src/V1/ComputeEngineDisksTargetDefaults.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDisksTargetDetails.php b/VmMigration/src/V1/ComputeEngineDisksTargetDetails.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDisksTargetDetails.php rename to VmMigration/src/V1/ComputeEngineDisksTargetDetails.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineNetworkTier.php b/VmMigration/src/V1/ComputeEngineNetworkTier.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineNetworkTier.php rename to VmMigration/src/V1/ComputeEngineNetworkTier.php diff --git a/VmMigration/src/V1/ComputeEngineTargetDefaults.php b/VmMigration/src/V1/ComputeEngineTargetDefaults.php index 2745c0b602a8..1d991762eeac 100644 --- a/VmMigration/src/V1/ComputeEngineTargetDefaults.php +++ b/VmMigration/src/V1/ComputeEngineTargetDefaults.php @@ -48,7 +48,7 @@ class ComputeEngineTargetDefaults extends \Google\Protobuf\Internal\Message */ protected $machine_type = ''; /** - * A map of network tags to associate with the VM. + * A list of network tags to associate with the VM. * * Generated from protobuf field repeated string network_tags = 6; */ @@ -60,9 +60,9 @@ class ComputeEngineTargetDefaults extends \Google\Protobuf\Internal\Message */ private $network_interfaces; /** - * The service account to associate the VM with. + * Optional. The service account to associate the VM with. * - * Generated from protobuf field string service_account = 8; + * Generated from protobuf field string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; */ protected $service_account = ''; /** @@ -97,13 +97,28 @@ class ComputeEngineTargetDefaults extends \Google\Protobuf\Internal\Message 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. + * 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. + * Optional. Defines whether the instance has vTPM enabled. + * This can be set to true only if the VM boot option is EFI. + * + * Generated from protobuf field bool enable_vtpm = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_vtpm = false; + /** + * Optional. Defines whether the instance has integrity monitoring enabled. + * This can be set to true only if the VM boot option is EFI, and vTPM is + * enabled. + * + * Generated from protobuf field bool enable_integrity_monitoring = 22 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_integrity_monitoring = 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]; */ @@ -126,6 +141,34 @@ class ComputeEngineTargetDefaults extends \Google\Protobuf\Internal\Message * Generated from protobuf field string hostname = 18; */ protected $hostname = ''; + /** + * Optional. Immutable. The encryption to apply to the VM disks. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $encryption = null; + /** + * Optional. By default the virtual machine will keep its existing boot + * option. Setting this property will trigger an internal process which will + * convert the virtual machine from using the existing boot option to another. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $boot_conversion = 0; + /** + * Optional. Additional replica zones of the target regional disks. + * If this list is not empty a regional disk will be created. The first + * supported zone would be the one stated in the + * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDefaults.zone] field. + * The rest are taken from this list. Please refer to the [regional disk + * creation + * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) + * for further details about regional vs zonal disks. If not specified, a + * zonal disk will be created in the same zone the VM is created. + * + * Generated from protobuf field repeated string disk_replica_zones = 24 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $disk_replica_zones; /** * Constructor. @@ -145,11 +188,11 @@ class ComputeEngineTargetDefaults extends \Google\Protobuf\Internal\Message * @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. + * A list 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. + * Optional. 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 @@ -162,15 +205,38 @@ class ComputeEngineTargetDefaults extends \Google\Protobuf\Internal\Message * 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. + * This can be set to true only if the VM boot option is EFI. + * @type bool $enable_vtpm + * Optional. Defines whether the instance has vTPM enabled. + * This can be set to true only if the VM boot option is EFI. + * @type bool $enable_integrity_monitoring + * Optional. Defines whether the instance has integrity monitoring enabled. + * This can be set to true only if the VM boot option is EFI, and vTPM is + * enabled. * @type int $boot_option - * Output only. The VM Boot Option, as set in the source vm. + * 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. + * @type \Google\Cloud\VMMigration\V1\Encryption $encryption + * Optional. Immutable. The encryption to apply to the VM disks. + * @type int $boot_conversion + * Optional. By default the virtual machine will keep its existing boot + * option. Setting this property will trigger an internal process which will + * convert the virtual machine from using the existing boot option to another. + * @type array|\Google\Protobuf\Internal\RepeatedField $disk_replica_zones + * Optional. Additional replica zones of the target regional disks. + * If this list is not empty a regional disk will be created. The first + * supported zone would be the one stated in the + * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDefaults.zone] field. + * The rest are taken from this list. Please refer to the [regional disk + * creation + * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) + * for further details about regional vs zonal disks. If not specified, a + * zonal disk will be created in the same zone the VM is created. * } */ public function __construct($data = NULL) { @@ -311,7 +377,7 @@ public function setMachineType($var) } /** - * A map of network tags to associate with the VM. + * A list of network tags to associate with the VM. * * Generated from protobuf field repeated string network_tags = 6; * @return \Google\Protobuf\Internal\RepeatedField @@ -322,7 +388,7 @@ public function getNetworkTags() } /** - * A map of network tags to associate with the VM. + * A list of network tags to associate with the VM. * * Generated from protobuf field repeated string network_tags = 6; * @param array|\Google\Protobuf\Internal\RepeatedField $var @@ -363,9 +429,9 @@ public function setNetworkInterfaces($var) } /** - * The service account to associate the VM with. + * Optional. The service account to associate the VM with. * - * Generated from protobuf field string service_account = 8; + * Generated from protobuf field string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getServiceAccount() @@ -374,9 +440,9 @@ public function getServiceAccount() } /** - * The service account to associate the VM with. + * Optional. The service account to associate the VM with. * - * Generated from protobuf field string service_account = 8; + * Generated from protobuf field string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -540,7 +606,7 @@ public function setComputeScheduling($var) /** * Defines whether the instance has Secure Boot enabled. - * This can be set to true only if the vm boot option is EFI. + * This can be set to true only if the VM boot option is EFI. * * Generated from protobuf field bool secure_boot = 14; * @return bool @@ -552,7 +618,7 @@ public function getSecureBoot() /** * Defines whether the instance has Secure Boot enabled. - * This can be set to true only if the vm boot option is EFI. + * 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 @@ -567,7 +633,65 @@ public function setSecureBoot($var) } /** - * Output only. The VM Boot Option, as set in the source vm. + * Optional. Defines whether the instance has vTPM enabled. + * This can be set to true only if the VM boot option is EFI. + * + * Generated from protobuf field bool enable_vtpm = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableVtpm() + { + return $this->enable_vtpm; + } + + /** + * Optional. Defines whether the instance has vTPM enabled. + * This can be set to true only if the VM boot option is EFI. + * + * Generated from protobuf field bool enable_vtpm = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableVtpm($var) + { + GPBUtil::checkBool($var); + $this->enable_vtpm = $var; + + return $this; + } + + /** + * Optional. Defines whether the instance has integrity monitoring enabled. + * This can be set to true only if the VM boot option is EFI, and vTPM is + * enabled. + * + * Generated from protobuf field bool enable_integrity_monitoring = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableIntegrityMonitoring() + { + return $this->enable_integrity_monitoring; + } + + /** + * Optional. Defines whether the instance has integrity monitoring enabled. + * This can be set to true only if the VM boot option is EFI, and vTPM is + * enabled. + * + * Generated from protobuf field bool enable_integrity_monitoring = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableIntegrityMonitoring($var) + { + GPBUtil::checkBool($var); + $this->enable_integrity_monitoring = $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 @@ -578,7 +702,7 @@ public function getBootOption() } /** - * Output only. The VM Boot Option, as set in the source vm. + * 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 @@ -670,5 +794,113 @@ public function setHostname($var) return $this; } + /** + * Optional. Immutable. The encryption to apply to the VM disks. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\VMMigration\V1\Encryption|null + */ + public function getEncryption() + { + return $this->encryption; + } + + public function hasEncryption() + { + return isset($this->encryption); + } + + public function clearEncryption() + { + unset($this->encryption); + } + + /** + * Optional. Immutable. The encryption to apply to the VM disks. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\VMMigration\V1\Encryption $var + * @return $this + */ + public function setEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Encryption::class); + $this->encryption = $var; + + return $this; + } + + /** + * Optional. By default the virtual machine will keep its existing boot + * option. Setting this property will trigger an internal process which will + * convert the virtual machine from using the existing boot option to another. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getBootConversion() + { + return $this->boot_conversion; + } + + /** + * Optional. By default the virtual machine will keep its existing boot + * option. Setting this property will trigger an internal process which will + * convert the virtual machine from using the existing boot option to another. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setBootConversion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\BootConversion::class); + $this->boot_conversion = $var; + + return $this; + } + + /** + * Optional. Additional replica zones of the target regional disks. + * If this list is not empty a regional disk will be created. The first + * supported zone would be the one stated in the + * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDefaults.zone] field. + * The rest are taken from this list. Please refer to the [regional disk + * creation + * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) + * for further details about regional vs zonal disks. If not specified, a + * zonal disk will be created in the same zone the VM is created. + * + * Generated from protobuf field repeated string disk_replica_zones = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDiskReplicaZones() + { + return $this->disk_replica_zones; + } + + /** + * Optional. Additional replica zones of the target regional disks. + * If this list is not empty a regional disk will be created. The first + * supported zone would be the one stated in the + * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDefaults.zone] field. + * The rest are taken from this list. Please refer to the [regional disk + * creation + * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) + * for further details about regional vs zonal disks. If not specified, a + * zonal disk will be created in the same zone the VM is created. + * + * Generated from protobuf field repeated string disk_replica_zones = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDiskReplicaZones($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->disk_replica_zones = $arr; + + return $this; + } + } diff --git a/VmMigration/src/V1/ComputeEngineTargetDetails.php b/VmMigration/src/V1/ComputeEngineTargetDetails.php index aaca78c78818..c014aa71e572 100644 --- a/VmMigration/src/V1/ComputeEngineTargetDetails.php +++ b/VmMigration/src/V1/ComputeEngineTargetDetails.php @@ -47,7 +47,7 @@ class ComputeEngineTargetDetails extends \Google\Protobuf\Internal\Message */ protected $machine_type = ''; /** - * A map of network tags to associate with the VM. + * A list of network tags to associate with the VM. * * Generated from protobuf field repeated string network_tags = 6; */ @@ -96,13 +96,25 @@ class ComputeEngineTargetDetails extends \Google\Protobuf\Internal\Message 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. + * 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. + * Optional. Defines whether the instance has vTPM enabled. + * + * Generated from protobuf field bool enable_vtpm = 21 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_vtpm = false; + /** + * Optional. Defines whether the instance has integrity monitoring enabled. + * + * Generated from protobuf field bool enable_integrity_monitoring = 22 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_integrity_monitoring = false; + /** + * The VM Boot Option, as set in the source VM. * * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineBootOption boot_option = 15; */ @@ -125,6 +137,34 @@ class ComputeEngineTargetDetails extends \Google\Protobuf\Internal\Message * Generated from protobuf field string hostname = 18; */ protected $hostname = ''; + /** + * Optional. The encryption to apply to the VM disks. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encryption = null; + /** + * Optional. By default the virtual machine will keep its existing boot + * option. Setting this property will trigger an internal process which will + * convert the virtual machine from using the existing boot option to another. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 20 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $boot_conversion = 0; + /** + * Optional. Additional replica zones of the target regional disks. + * If this list is not empty a regional disk will be created. The first + * supported zone would be the one stated in the + * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDetails.zone] field. + * The rest are taken from this list. Please refer to the [regional disk + * creation + * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) + * for further details about regional vs zonal disks. If not specified, a + * zonal disk will be created in the same zone the VM is created. + * + * Generated from protobuf field repeated string disk_replica_zones = 24 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $disk_replica_zones; /** * Constructor. @@ -143,7 +183,7 @@ class ComputeEngineTargetDetails extends \Google\Protobuf\Internal\Message * @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. + * A list 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 @@ -160,15 +200,35 @@ class ComputeEngineTargetDetails extends \Google\Protobuf\Internal\Message * 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. + * This can be set to true only if the VM boot option is EFI. + * @type bool $enable_vtpm + * Optional. Defines whether the instance has vTPM enabled. + * @type bool $enable_integrity_monitoring + * Optional. Defines whether the instance has integrity monitoring enabled. * @type int $boot_option - * The VM Boot Option, as set in the source vm. + * 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. + * @type \Google\Cloud\VMMigration\V1\Encryption $encryption + * Optional. The encryption to apply to the VM disks. + * @type int $boot_conversion + * Optional. By default the virtual machine will keep its existing boot + * option. Setting this property will trigger an internal process which will + * convert the virtual machine from using the existing boot option to another. + * @type array|\Google\Protobuf\Internal\RepeatedField $disk_replica_zones + * Optional. Additional replica zones of the target regional disks. + * If this list is not empty a regional disk will be created. The first + * supported zone would be the one stated in the + * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDetails.zone] field. + * The rest are taken from this list. Please refer to the [regional disk + * creation + * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) + * for further details about regional vs zonal disks. If not specified, a + * zonal disk will be created in the same zone the VM is created. * } */ public function __construct($data = NULL) { @@ -307,7 +367,7 @@ public function setMachineType($var) } /** - * A map of network tags to associate with the VM. + * A list of network tags to associate with the VM. * * Generated from protobuf field repeated string network_tags = 6; * @return \Google\Protobuf\Internal\RepeatedField @@ -318,7 +378,7 @@ public function getNetworkTags() } /** - * A map of network tags to associate with the VM. + * A list of network tags to associate with the VM. * * Generated from protobuf field repeated string network_tags = 6; * @param array|\Google\Protobuf\Internal\RepeatedField $var @@ -536,7 +596,7 @@ public function setComputeScheduling($var) /** * Defines whether the instance has Secure Boot enabled. - * This can be set to true only if the vm boot option is EFI. + * This can be set to true only if the VM boot option is EFI. * * Generated from protobuf field bool secure_boot = 14; * @return bool @@ -548,7 +608,7 @@ public function getSecureBoot() /** * Defines whether the instance has Secure Boot enabled. - * This can be set to true only if the vm boot option is EFI. + * 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 @@ -563,7 +623,59 @@ public function setSecureBoot($var) } /** - * The VM Boot Option, as set in the source vm. + * Optional. Defines whether the instance has vTPM enabled. + * + * Generated from protobuf field bool enable_vtpm = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableVtpm() + { + return $this->enable_vtpm; + } + + /** + * Optional. Defines whether the instance has vTPM enabled. + * + * Generated from protobuf field bool enable_vtpm = 21 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableVtpm($var) + { + GPBUtil::checkBool($var); + $this->enable_vtpm = $var; + + return $this; + } + + /** + * Optional. Defines whether the instance has integrity monitoring enabled. + * + * Generated from protobuf field bool enable_integrity_monitoring = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableIntegrityMonitoring() + { + return $this->enable_integrity_monitoring; + } + + /** + * Optional. Defines whether the instance has integrity monitoring enabled. + * + * Generated from protobuf field bool enable_integrity_monitoring = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableIntegrityMonitoring($var) + { + GPBUtil::checkBool($var); + $this->enable_integrity_monitoring = $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 @@ -574,7 +686,7 @@ public function getBootOption() } /** - * The VM Boot Option, as set in the source vm. + * 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 @@ -666,5 +778,113 @@ public function setHostname($var) return $this; } + /** + * Optional. The encryption to apply to the VM disks. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VMMigration\V1\Encryption|null + */ + public function getEncryption() + { + return $this->encryption; + } + + public function hasEncryption() + { + return isset($this->encryption); + } + + public function clearEncryption() + { + unset($this->encryption); + } + + /** + * Optional. The encryption to apply to the VM disks. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VMMigration\V1\Encryption $var + * @return $this + */ + public function setEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Encryption::class); + $this->encryption = $var; + + return $this; + } + + /** + * Optional. By default the virtual machine will keep its existing boot + * option. Setting this property will trigger an internal process which will + * convert the virtual machine from using the existing boot option to another. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getBootConversion() + { + return $this->boot_conversion; + } + + /** + * Optional. By default the virtual machine will keep its existing boot + * option. Setting this property will trigger an internal process which will + * convert the virtual machine from using the existing boot option to another. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 20 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setBootConversion($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\BootConversion::class); + $this->boot_conversion = $var; + + return $this; + } + + /** + * Optional. Additional replica zones of the target regional disks. + * If this list is not empty a regional disk will be created. The first + * supported zone would be the one stated in the + * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDetails.zone] field. + * The rest are taken from this list. Please refer to the [regional disk + * creation + * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) + * for further details about regional vs zonal disks. If not specified, a + * zonal disk will be created in the same zone the VM is created. + * + * Generated from protobuf field repeated string disk_replica_zones = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getDiskReplicaZones() + { + return $this->disk_replica_zones; + } + + /** + * Optional. Additional replica zones of the target regional disks. + * If this list is not empty a regional disk will be created. The first + * supported zone would be the one stated in the + * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDetails.zone] field. + * The rest are taken from this list. Please refer to the [regional disk + * creation + * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) + * for further details about regional vs zonal disks. If not specified, a + * zonal disk will be created in the same zone the VM is created. + * + * Generated from protobuf field repeated string disk_replica_zones = 24 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setDiskReplicaZones($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->disk_replica_zones = $arr; + + return $this; + } + } diff --git a/VmMigration/src/V1/ComputeScheduling.php b/VmMigration/src/V1/ComputeScheduling.php index bc30aaa06e34..2c038f9ccb9c 100644 --- a/VmMigration/src/V1/ComputeScheduling.php +++ b/VmMigration/src/V1/ComputeScheduling.php @@ -11,6 +11,8 @@ /** * Scheduling information for VM on maintenance/restart behaviour and * node allocation in sole tenant nodes. + * Options for instance behavior when the host machine undergoes + * maintenance that may temporarily impact instance performance. * * Generated from protobuf message google.cloud.vmmigration.v1.ComputeScheduling */ diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CopyingSourceDiskSnapshotStep.php b/VmMigration/src/V1/CopyingSourceDiskSnapshotStep.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CopyingSourceDiskSnapshotStep.php rename to VmMigration/src/V1/CopyingSourceDiskSnapshotStep.php diff --git a/VmMigration/src/V1/CreateCloneJobRequest.php b/VmMigration/src/V1/CreateCloneJobRequest.php index 41851b8961e2..119c3418d7ff 100644 --- a/VmMigration/src/V1/CreateCloneJobRequest.php +++ b/VmMigration/src/V1/CreateCloneJobRequest.php @@ -38,8 +38,8 @@ class CreateCloneJobRequest extends \Google\Protobuf\Internal\Message * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -85,8 +85,8 @@ public static function build(string $parent, \Google\Cloud\VMMigration\V1\CloneJ * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -192,8 +192,8 @@ public function setCloneJob($var) * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -213,8 +213,8 @@ public function getRequestId() * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. diff --git a/VmMigration/src/V1/CreateCutoverJobRequest.php b/VmMigration/src/V1/CreateCutoverJobRequest.php index ca9cc7598345..041fd4c6d145 100644 --- a/VmMigration/src/V1/CreateCutoverJobRequest.php +++ b/VmMigration/src/V1/CreateCutoverJobRequest.php @@ -38,8 +38,8 @@ class CreateCutoverJobRequest extends \Google\Protobuf\Internal\Message * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -85,8 +85,8 @@ public static function build(string $parent, \Google\Cloud\VMMigration\V1\Cutove * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -192,8 +192,8 @@ public function setCutoverJob($var) * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -213,8 +213,8 @@ public function getRequestId() * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. diff --git a/VmMigration/src/V1/CreateDatacenterConnectorRequest.php b/VmMigration/src/V1/CreateDatacenterConnectorRequest.php index ec4aaf84d99f..06e5d91a6460 100644 --- a/VmMigration/src/V1/CreateDatacenterConnectorRequest.php +++ b/VmMigration/src/V1/CreateDatacenterConnectorRequest.php @@ -41,8 +41,8 @@ class CreateDatacenterConnectorRequest extends \Google\Protobuf\Internal\Message * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -94,8 +94,8 @@ public static function build(string $parent, \Google\Cloud\VMMigration\V1\Datace * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -207,8 +207,8 @@ public function setDatacenterConnector($var) * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -228,8 +228,8 @@ public function getRequestId() * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDiskMigrationJobRequest.php b/VmMigration/src/V1/CreateDiskMigrationJobRequest.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateDiskMigrationJobRequest.php rename to VmMigration/src/V1/CreateDiskMigrationJobRequest.php diff --git a/VmMigration/src/V1/CreateGroupRequest.php b/VmMigration/src/V1/CreateGroupRequest.php index de9bfaea8932..6364b1934cb1 100644 --- a/VmMigration/src/V1/CreateGroupRequest.php +++ b/VmMigration/src/V1/CreateGroupRequest.php @@ -38,8 +38,8 @@ class CreateGroupRequest extends \Google\Protobuf\Internal\Message * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -85,8 +85,8 @@ public static function build(string $parent, \Google\Cloud\VMMigration\V1\Group * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -192,8 +192,8 @@ public function setGroup($var) * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -213,8 +213,8 @@ public function getRequestId() * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateImageImportRequest.php b/VmMigration/src/V1/CreateImageImportRequest.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreateImageImportRequest.php rename to VmMigration/src/V1/CreateImageImportRequest.php diff --git a/VmMigration/src/V1/CreateMigratingVmRequest.php b/VmMigration/src/V1/CreateMigratingVmRequest.php index c12c649f5023..58176266340b 100644 --- a/VmMigration/src/V1/CreateMigratingVmRequest.php +++ b/VmMigration/src/V1/CreateMigratingVmRequest.php @@ -38,8 +38,8 @@ class CreateMigratingVmRequest extends \Google\Protobuf\Internal\Message * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -85,8 +85,8 @@ public static function build(string $parent, \Google\Cloud\VMMigration\V1\Migrat * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -192,8 +192,8 @@ public function setMigratingVm($var) * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -213,8 +213,8 @@ public function getRequestId() * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. diff --git a/VmMigration/src/V1/CreateSourceRequest.php b/VmMigration/src/V1/CreateSourceRequest.php index 525bb5819b4a..1ead753254f4 100644 --- a/VmMigration/src/V1/CreateSourceRequest.php +++ b/VmMigration/src/V1/CreateSourceRequest.php @@ -38,8 +38,8 @@ class CreateSourceRequest extends \Google\Protobuf\Internal\Message * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -85,8 +85,8 @@ public static function build(string $parent, \Google\Cloud\VMMigration\V1\Source * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -192,8 +192,8 @@ public function setSource($var) * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -213,8 +213,8 @@ public function getRequestId() * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. diff --git a/VmMigration/src/V1/CreateTargetProjectRequest.php b/VmMigration/src/V1/CreateTargetProjectRequest.php index fa7e25ef6158..c8933d912aa1 100644 --- a/VmMigration/src/V1/CreateTargetProjectRequest.php +++ b/VmMigration/src/V1/CreateTargetProjectRequest.php @@ -38,8 +38,8 @@ class CreateTargetProjectRequest extends \Google\Protobuf\Internal\Message * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -85,8 +85,8 @@ public static function build(string $parent, \Google\Cloud\VMMigration\V1\Target * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -192,8 +192,8 @@ public function setTargetProject($var) * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -213,8 +213,8 @@ public function getRequestId() * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. diff --git a/VmMigration/src/V1/CreateUtilizationReportRequest.php b/VmMigration/src/V1/CreateUtilizationReportRequest.php index 80a507c49703..4e9e80122c18 100644 --- a/VmMigration/src/V1/CreateUtilizationReportRequest.php +++ b/VmMigration/src/V1/CreateUtilizationReportRequest.php @@ -42,8 +42,8 @@ class CreateUtilizationReportRequest extends \Google\Protobuf\Internal\Message * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -98,8 +98,8 @@ public static function build(string $parent, \Google\Cloud\VMMigration\V1\Utiliz * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -213,8 +213,8 @@ public function setUtilizationReportId($var) * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -234,8 +234,8 @@ public function getRequestId() * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreatingImageStep.php b/VmMigration/src/V1/CreatingImageStep.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreatingImageStep.php rename to VmMigration/src/V1/CreatingImageStep.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreatingSourceDiskSnapshotStep.php b/VmMigration/src/V1/CreatingSourceDiskSnapshotStep.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CreatingSourceDiskSnapshotStep.php rename to VmMigration/src/V1/CreatingSourceDiskSnapshotStep.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverForecast.php b/VmMigration/src/V1/CutoverForecast.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverForecast.php rename to VmMigration/src/V1/CutoverForecast.php diff --git a/VmMigration/src/V1/CutoverJob.php b/VmMigration/src/V1/CutoverJob.php index 3fafe9c8c7e7..f8930646f96d 100644 --- a/VmMigration/src/V1/CutoverJob.php +++ b/VmMigration/src/V1/CutoverJob.php @@ -11,7 +11,7 @@ /** * CutoverJob message describes a cutover of a migrating VM. The CutoverJob is * the operation of shutting down the VM, creating a snapshot and - * clonning the VM using the replicated snapshot. + * cloning the VM using the replicated snapshot. * * Generated from protobuf message google.cloud.vmmigration.v1.CutoverJob */ @@ -84,6 +84,8 @@ class CutoverJob extends \Google\Protobuf\Internal\Message * * @type \Google\Cloud\VMMigration\V1\ComputeEngineTargetDetails $compute_engine_target_details * Output only. Details of the target VM in Compute Engine. + * @type \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails $compute_engine_disks_target_details + * Output only. Details of the target Persistent Disks 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). @@ -143,6 +145,37 @@ public function setComputeEngineTargetDetails($var) return $this; } + /** + * Output only. Details of the target Persistent Disks in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDisksTargetDetails compute_engine_disks_target_details = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails|null + */ + public function getComputeEngineDisksTargetDetails() + { + return $this->readOneof(20); + } + + public function hasComputeEngineDisksTargetDetails() + { + return $this->hasOneof(20); + } + + /** + * Output only. Details of the target Persistent Disks in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDisksTargetDetails compute_engine_disks_target_details = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails $var + * @return $this + */ + public function setComputeEngineDisksTargetDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails::class); + $this->writeOneof(20, $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). diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DataDiskImageImport.php b/VmMigration/src/V1/DataDiskImageImport.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DataDiskImageImport.php rename to VmMigration/src/V1/DataDiskImageImport.php diff --git a/VmMigration/src/V1/DeleteDatacenterConnectorRequest.php b/VmMigration/src/V1/DeleteDatacenterConnectorRequest.php index 3a18f26d864c..46e04e917a45 100644 --- a/VmMigration/src/V1/DeleteDatacenterConnectorRequest.php +++ b/VmMigration/src/V1/DeleteDatacenterConnectorRequest.php @@ -26,8 +26,8 @@ class DeleteDatacenterConnectorRequest extends \Google\Protobuf\Internal\Message * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -65,8 +65,8 @@ public static function build(string $name): self * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -110,8 +110,8 @@ public function setName($var) * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -131,8 +131,8 @@ public function getRequestId() * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDiskMigrationJobRequest.php b/VmMigration/src/V1/DeleteDiskMigrationJobRequest.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteDiskMigrationJobRequest.php rename to VmMigration/src/V1/DeleteDiskMigrationJobRequest.php diff --git a/VmMigration/src/V1/DeleteGroupRequest.php b/VmMigration/src/V1/DeleteGroupRequest.php index 58ed1909db6e..60e62e2f1352 100644 --- a/VmMigration/src/V1/DeleteGroupRequest.php +++ b/VmMigration/src/V1/DeleteGroupRequest.php @@ -26,8 +26,8 @@ class DeleteGroupRequest extends \Google\Protobuf\Internal\Message * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -65,8 +65,8 @@ public static function build(string $name): self * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -110,8 +110,8 @@ public function setName($var) * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -131,8 +131,8 @@ public function getRequestId() * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteImageImportRequest.php b/VmMigration/src/V1/DeleteImageImportRequest.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DeleteImageImportRequest.php rename to VmMigration/src/V1/DeleteImageImportRequest.php diff --git a/VmMigration/src/V1/DeleteSourceRequest.php b/VmMigration/src/V1/DeleteSourceRequest.php index 73363cfd5bc7..fecc2f1d3685 100644 --- a/VmMigration/src/V1/DeleteSourceRequest.php +++ b/VmMigration/src/V1/DeleteSourceRequest.php @@ -26,8 +26,8 @@ class DeleteSourceRequest extends \Google\Protobuf\Internal\Message * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -65,8 +65,8 @@ public static function build(string $name): self * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -110,8 +110,8 @@ public function setName($var) * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -131,8 +131,8 @@ public function getRequestId() * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. diff --git a/VmMigration/src/V1/DeleteTargetProjectRequest.php b/VmMigration/src/V1/DeleteTargetProjectRequest.php index d1c390849152..a31415afd16a 100644 --- a/VmMigration/src/V1/DeleteTargetProjectRequest.php +++ b/VmMigration/src/V1/DeleteTargetProjectRequest.php @@ -26,8 +26,8 @@ class DeleteTargetProjectRequest extends \Google\Protobuf\Internal\Message * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -65,8 +65,8 @@ public static function build(string $name): self * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -110,8 +110,8 @@ public function setName($var) * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -131,8 +131,8 @@ public function getRequestId() * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. diff --git a/VmMigration/src/V1/DeleteUtilizationReportRequest.php b/VmMigration/src/V1/DeleteUtilizationReportRequest.php index 8341c1a7702f..4c2b2b73e4c9 100644 --- a/VmMigration/src/V1/DeleteUtilizationReportRequest.php +++ b/VmMigration/src/V1/DeleteUtilizationReportRequest.php @@ -26,8 +26,8 @@ class DeleteUtilizationReportRequest extends \Google\Protobuf\Internal\Message * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -65,8 +65,8 @@ public static function build(string $name): self * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -110,8 +110,8 @@ public function setName($var) * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -131,8 +131,8 @@ public function getRequestId() * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskImageTargetDetails.php b/VmMigration/src/V1/DiskImageTargetDetails.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskImageTargetDetails.php rename to VmMigration/src/V1/DiskImageTargetDetails.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationJob.php b/VmMigration/src/V1/DiskMigrationJob.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationJob.php rename to VmMigration/src/V1/DiskMigrationJob.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationJob/State.php b/VmMigration/src/V1/DiskMigrationJob/State.php similarity index 93% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationJob/State.php rename to VmMigration/src/V1/DiskMigrationJob/State.php index dd41695d150a..e45c87ce8901 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationJob/State.php +++ b/VmMigration/src/V1/DiskMigrationJob/State.php @@ -88,6 +88,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VMMigration\V1\DiskMigrationJob_State::class); diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationJobTargetDetails.php b/VmMigration/src/V1/DiskMigrationJobTargetDetails.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationJobTargetDetails.php rename to VmMigration/src/V1/DiskMigrationJobTargetDetails.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationStep.php b/VmMigration/src/V1/DiskMigrationStep.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DiskMigrationStep.php rename to VmMigration/src/V1/DiskMigrationStep.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationDisksTargetDefaults.php b/VmMigration/src/V1/DisksMigrationDisksTargetDefaults.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationDisksTargetDefaults.php rename to VmMigration/src/V1/DisksMigrationDisksTargetDefaults.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationDisksTargetDetails.php b/VmMigration/src/V1/DisksMigrationDisksTargetDetails.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationDisksTargetDetails.php rename to VmMigration/src/V1/DisksMigrationDisksTargetDetails.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationVmTargetDefaults.php b/VmMigration/src/V1/DisksMigrationVmTargetDefaults.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationVmTargetDefaults.php rename to VmMigration/src/V1/DisksMigrationVmTargetDefaults.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationVmTargetDetails.php b/VmMigration/src/V1/DisksMigrationVmTargetDetails.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/DisksMigrationVmTargetDetails.php rename to VmMigration/src/V1/DisksMigrationVmTargetDetails.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Encryption.php b/VmMigration/src/V1/Encryption.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Encryption.php rename to VmMigration/src/V1/Encryption.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ExtendMigrationRequest.php b/VmMigration/src/V1/ExtendMigrationRequest.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ExtendMigrationRequest.php rename to VmMigration/src/V1/ExtendMigrationRequest.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ExtendMigrationResponse.php b/VmMigration/src/V1/ExtendMigrationResponse.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ExtendMigrationResponse.php rename to VmMigration/src/V1/ExtendMigrationResponse.php diff --git a/VmMigration/src/V1/FetchInventoryResponse.php b/VmMigration/src/V1/FetchInventoryResponse.php index ce1bdac4c8c1..5a03c38c69aa 100644 --- a/VmMigration/src/V1/FetchInventoryResponse.php +++ b/VmMigration/src/V1/FetchInventoryResponse.php @@ -35,6 +35,8 @@ class FetchInventoryResponse extends \Google\Protobuf\Internal\Message * 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\Cloud\VMMigration\V1\AzureVmsDetails $azure_vms + * The description of the VMs in a Source of type Azure. * @type \Google\Protobuf\Timestamp $update_time * Output only. The timestamp when the source was last queried (if the result * is from the cache). @@ -107,6 +109,37 @@ public function setAwsVms($var) return $this; } + /** + * The description of the VMs in a Source of type Azure. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureVmsDetails azure_vms = 5; + * @return \Google\Cloud\VMMigration\V1\AzureVmsDetails|null + */ + public function getAzureVms() + { + return $this->readOneof(5); + } + + public function hasAzureVms() + { + return $this->hasOneof(5); + } + + /** + * The description of the VMs in a Source of type Azure. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureVmsDetails azure_vms = 5; + * @param \Google\Cloud\VMMigration\V1\AzureVmsDetails $var + * @return $this + */ + public function setAzureVms($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AzureVmsDetails::class); + $this->writeOneof(5, $var); + + return $this; + } + /** * Output only. The timestamp when the source was last queried (if the result * is from the cache). diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchStorageInventoryRequest.php b/VmMigration/src/V1/FetchStorageInventoryRequest.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchStorageInventoryRequest.php rename to VmMigration/src/V1/FetchStorageInventoryRequest.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchStorageInventoryRequest/StorageType.php b/VmMigration/src/V1/FetchStorageInventoryRequest/StorageType.php similarity index 89% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchStorageInventoryRequest/StorageType.php rename to VmMigration/src/V1/FetchStorageInventoryRequest/StorageType.php index 80bb09595a55..0db72a0db67f 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchStorageInventoryRequest/StorageType.php +++ b/VmMigration/src/V1/FetchStorageInventoryRequest/StorageType.php @@ -59,6 +59,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(StorageType::class, \Google\Cloud\VMMigration\V1\FetchStorageInventoryRequest_StorageType::class); diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchStorageInventoryResponse.php b/VmMigration/src/V1/FetchStorageInventoryResponse.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchStorageInventoryResponse.php rename to VmMigration/src/V1/FetchStorageInventoryResponse.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetDiskMigrationJobRequest.php b/VmMigration/src/V1/GetDiskMigrationJobRequest.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetDiskMigrationJobRequest.php rename to VmMigration/src/V1/GetDiskMigrationJobRequest.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetImageImportJobRequest.php b/VmMigration/src/V1/GetImageImportJobRequest.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetImageImportJobRequest.php rename to VmMigration/src/V1/GetImageImportJobRequest.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetImageImportRequest.php b/VmMigration/src/V1/GetImageImportRequest.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/GetImageImportRequest.php rename to VmMigration/src/V1/GetImageImportRequest.php diff --git a/VmMigration/src/V1/Group.php b/VmMigration/src/V1/Group.php index ea661a9c1fef..ee1129f87c76 100644 --- a/VmMigration/src/V1/Group.php +++ b/VmMigration/src/V1/Group.php @@ -46,6 +46,12 @@ class Group extends \Google\Protobuf\Internal\Message * Generated from protobuf field string display_name = 5; */ protected $display_name = ''; + /** + * Immutable. The target type of this group. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Group.MigrationTargetType migration_target_type = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $migration_target_type = 0; /** * Constructor. @@ -63,6 +69,8 @@ class Group extends \Google\Protobuf\Internal\Message * User-provided description of the group. * @type string $display_name * Display name is a user defined name for this group which can be updated. + * @type int $migration_target_type + * Immutable. The target type of this group. * } */ public function __construct($data = NULL) { @@ -220,5 +228,31 @@ public function setDisplayName($var) return $this; } + /** + * Immutable. The target type of this group. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Group.MigrationTargetType migration_target_type = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getMigrationTargetType() + { + return $this->migration_target_type; + } + + /** + * Immutable. The target type of this group. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Group.MigrationTargetType migration_target_type = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setMigrationTargetType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\Group\MigrationTargetType::class); + $this->migration_target_type = $var; + + return $this; + } + } diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group/MigrationTargetType.php b/VmMigration/src/V1/Group/MigrationTargetType.php similarity index 91% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group/MigrationTargetType.php rename to VmMigration/src/V1/Group/MigrationTargetType.php index bf09e87126f6..b83ca47adb88 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group/MigrationTargetType.php +++ b/VmMigration/src/V1/Group/MigrationTargetType.php @@ -59,6 +59,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MigrationTargetType::class, \Google\Cloud\VMMigration\V1\Group_MigrationTargetType::class); diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImport.php b/VmMigration/src/V1/ImageImport.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImport.php rename to VmMigration/src/V1/ImageImport.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportJob.php b/VmMigration/src/V1/ImageImportJob.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportJob.php rename to VmMigration/src/V1/ImageImportJob.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportJob/State.php b/VmMigration/src/V1/ImageImportJob/State.php similarity index 93% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportJob/State.php rename to VmMigration/src/V1/ImageImportJob/State.php index 8d1024602300..6aa3010d08c3 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportJob/State.php +++ b/VmMigration/src/V1/ImageImportJob/State.php @@ -87,6 +87,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(State::class, \Google\Cloud\VMMigration\V1\ImageImportJob_State::class); diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportOsAdaptationParameters.php b/VmMigration/src/V1/ImageImportOsAdaptationParameters.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportOsAdaptationParameters.php rename to VmMigration/src/V1/ImageImportOsAdaptationParameters.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportStep.php b/VmMigration/src/V1/ImageImportStep.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ImageImportStep.php rename to VmMigration/src/V1/ImageImportStep.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingImageImportStep.php b/VmMigration/src/V1/InitializingImageImportStep.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/InitializingImageImportStep.php rename to VmMigration/src/V1/InitializingImageImportStep.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDiskMigrationJobsRequest.php b/VmMigration/src/V1/ListDiskMigrationJobsRequest.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDiskMigrationJobsRequest.php rename to VmMigration/src/V1/ListDiskMigrationJobsRequest.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDiskMigrationJobsResponse.php b/VmMigration/src/V1/ListDiskMigrationJobsResponse.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListDiskMigrationJobsResponse.php rename to VmMigration/src/V1/ListDiskMigrationJobsResponse.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListImageImportJobsRequest.php b/VmMigration/src/V1/ListImageImportJobsRequest.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListImageImportJobsRequest.php rename to VmMigration/src/V1/ListImageImportJobsRequest.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListImageImportJobsResponse.php b/VmMigration/src/V1/ListImageImportJobsResponse.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListImageImportJobsResponse.php rename to VmMigration/src/V1/ListImageImportJobsResponse.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListImageImportsRequest.php b/VmMigration/src/V1/ListImageImportsRequest.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListImageImportsRequest.php rename to VmMigration/src/V1/ListImageImportsRequest.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListImageImportsResponse.php b/VmMigration/src/V1/ListImageImportsResponse.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ListImageImportsResponse.php rename to VmMigration/src/V1/ListImageImportsResponse.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/LoadingImageSourceFilesStep.php b/VmMigration/src/V1/LoadingImageSourceFilesStep.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/LoadingImageSourceFilesStep.php rename to VmMigration/src/V1/LoadingImageSourceFilesStep.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MachineImageParametersOverrides.php b/VmMigration/src/V1/MachineImageParametersOverrides.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MachineImageParametersOverrides.php rename to VmMigration/src/V1/MachineImageParametersOverrides.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MachineImageTargetDetails.php b/VmMigration/src/V1/MachineImageTargetDetails.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MachineImageTargetDetails.php rename to VmMigration/src/V1/MachineImageTargetDetails.php diff --git a/VmMigration/src/V1/MigratingVm.php b/VmMigration/src/V1/MigratingVm.php index a86771ba3c43..41fa47c86dbd 100644 --- a/VmMigration/src/V1/MigratingVm.php +++ b/VmMigration/src/V1/MigratingVm.php @@ -81,12 +81,19 @@ class MigratingVm extends \Google\Protobuf\Internal\Message */ protected $state_time = null; /** - * Output only. The percentage progress of the current running replication - * cycle. + * Output only. Details 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. Details of the last replication cycle. This will be updated + * whenever a replication cycle is finished and is not to be confused with + * last_sync which is only updated on successful replication cycles. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle last_replication_cycle = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_replication_cycle = null; /** * Output only. The group this migrating vm is included in, if any. The group * is represented by the full path of the appropriate @@ -128,6 +135,20 @@ class MigratingVm extends \Google\Protobuf\Internal\Message * Generated from protobuf field repeated .google.cloud.vmmigration.v1.CutoverJob recent_cutover_jobs = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ private $recent_cutover_jobs; + /** + * Output only. Provides details of future CutoverJobs of a MigratingVm. + * Set to empty when cutover forecast is unavailable. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverForecast cutover_forecast = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $cutover_forecast = null; + /** + * Output only. Provides details about the expiration state of the migrating + * VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.Expiration expiration = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expiration = null; protected $target_vm_defaults; protected $source_vm_details; @@ -139,8 +160,14 @@ class MigratingVm extends \Google\Protobuf\Internal\Message * * @type \Google\Cloud\VMMigration\V1\ComputeEngineTargetDefaults $compute_engine_target_defaults * Details of the target VM in Compute Engine. + * @type \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDefaults $compute_engine_disks_target_defaults + * Details of the target Persistent Disks in Compute Engine. + * @type \Google\Cloud\VMMigration\V1\VmwareSourceVmDetails $vmware_source_vm_details + * Output only. Details of the VM from a Vmware source. * @type \Google\Cloud\VMMigration\V1\AwsSourceVmDetails $aws_source_vm_details * Output only. Details of the VM from an AWS source. + * @type \Google\Cloud\VMMigration\V1\AzureSourceVmDetails $azure_source_vm_details + * Output only. Details of the VM from an Azure source. * @type string $name * Output only. The identifier of the MigratingVm. * @type string $source_vm_id @@ -166,8 +193,11 @@ class MigratingVm extends \Google\Protobuf\Internal\Message * @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. + * Output only. Details of the current running replication cycle. + * @type \Google\Cloud\VMMigration\V1\ReplicationCycle $last_replication_cycle + * Output only. Details of the last replication cycle. This will be updated + * whenever a replication cycle is finished and is not to be confused with + * last_sync which is only updated on successful replication cycles. * @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 @@ -189,6 +219,12 @@ class MigratingVm extends \Google\Protobuf\Internal\Message * 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. + * @type \Google\Cloud\VMMigration\V1\CutoverForecast $cutover_forecast + * Output only. Provides details of future CutoverJobs of a MigratingVm. + * Set to empty when cutover forecast is unavailable. + * @type \Google\Cloud\VMMigration\V1\MigratingVm\Expiration $expiration + * Output only. Provides details about the expiration state of the migrating + * VM. * } */ public function __construct($data = NULL) { @@ -227,6 +263,68 @@ public function setComputeEngineTargetDefaults($var) return $this; } + /** + * Details of the target Persistent Disks in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDisksTargetDefaults compute_engine_disks_target_defaults = 34; + * @return \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDefaults|null + */ + public function getComputeEngineDisksTargetDefaults() + { + return $this->readOneof(34); + } + + public function hasComputeEngineDisksTargetDefaults() + { + return $this->hasOneof(34); + } + + /** + * Details of the target Persistent Disks in Compute Engine. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDisksTargetDefaults compute_engine_disks_target_defaults = 34; + * @param \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDefaults $var + * @return $this + */ + public function setComputeEngineDisksTargetDefaults($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDefaults::class); + $this->writeOneof(34, $var); + + return $this; + } + + /** + * Output only. Details of the VM from a Vmware source. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareSourceVmDetails vmware_source_vm_details = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\VmwareSourceVmDetails|null + */ + public function getVmwareSourceVmDetails() + { + return $this->readOneof(28); + } + + public function hasVmwareSourceVmDetails() + { + return $this->hasOneof(28); + } + + /** + * Output only. Details of the VM from a Vmware source. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareSourceVmDetails vmware_source_vm_details = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\VmwareSourceVmDetails $var + * @return $this + */ + public function setVmwareSourceVmDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmwareSourceVmDetails::class); + $this->writeOneof(28, $var); + + return $this; + } + /** * Output only. Details of the VM from an AWS source. * @@ -258,6 +356,37 @@ public function setAwsSourceVmDetails($var) return $this; } + /** + * Output only. Details of the VM from an Azure source. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureSourceVmDetails azure_source_vm_details = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\AzureSourceVmDetails|null + */ + public function getAzureSourceVmDetails() + { + return $this->readOneof(30); + } + + public function hasAzureSourceVmDetails() + { + return $this->hasOneof(30); + } + + /** + * Output only. Details of the VM from an Azure source. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureSourceVmDetails azure_source_vm_details = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\AzureSourceVmDetails $var + * @return $this + */ + public function setAzureSourceVmDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AzureSourceVmDetails::class); + $this->writeOneof(30, $var); + + return $this; + } + /** * Output only. The identifier of the MigratingVm. * @@ -577,8 +706,7 @@ public function setStateTime($var) } /** - * Output only. The percentage progress of the current running replication - * cycle. + * Output only. Details 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 @@ -599,8 +727,7 @@ public function clearCurrentSyncInfo() } /** - * Output only. The percentage progress of the current running replication - * cycle. + * Output only. Details 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 @@ -614,6 +741,46 @@ public function setCurrentSyncInfo($var) return $this; } + /** + * Output only. Details of the last replication cycle. This will be updated + * whenever a replication cycle is finished and is not to be confused with + * last_sync which is only updated on successful replication cycles. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle last_replication_cycle = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\ReplicationCycle|null + */ + public function getLastReplicationCycle() + { + return $this->last_replication_cycle; + } + + public function hasLastReplicationCycle() + { + return isset($this->last_replication_cycle); + } + + public function clearLastReplicationCycle() + { + unset($this->last_replication_cycle); + } + + /** + * Output only. Details of the last replication cycle. This will be updated + * whenever a replication cycle is finished and is not to be confused with + * last_sync which is only updated on successful replication cycles. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle last_replication_cycle = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\ReplicationCycle $var + * @return $this + */ + public function setLastReplicationCycle($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicationCycle::class); + $this->last_replication_cycle = $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 @@ -776,6 +943,82 @@ public function setRecentCutoverJobs($var) return $this; } + /** + * Output only. Provides details of future CutoverJobs of a MigratingVm. + * Set to empty when cutover forecast is unavailable. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverForecast cutover_forecast = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\CutoverForecast|null + */ + public function getCutoverForecast() + { + return $this->cutover_forecast; + } + + public function hasCutoverForecast() + { + return isset($this->cutover_forecast); + } + + public function clearCutoverForecast() + { + unset($this->cutover_forecast); + } + + /** + * Output only. Provides details of future CutoverJobs of a MigratingVm. + * Set to empty when cutover forecast is unavailable. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverForecast cutover_forecast = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\CutoverForecast $var + * @return $this + */ + public function setCutoverForecast($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\CutoverForecast::class); + $this->cutover_forecast = $var; + + return $this; + } + + /** + * Output only. Provides details about the expiration state of the migrating + * VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.Expiration expiration = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VMMigration\V1\MigratingVm\Expiration|null + */ + public function getExpiration() + { + return $this->expiration; + } + + public function hasExpiration() + { + return isset($this->expiration); + } + + public function clearExpiration() + { + unset($this->expiration); + } + + /** + * Output only. Provides details about the expiration state of the migrating + * VM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.Expiration expiration = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VMMigration\V1\MigratingVm\Expiration $var + * @return $this + */ + public function setExpiration($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\MigratingVm\Expiration::class); + $this->expiration = $var; + + return $this; + } + /** * @return string */ diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/Expiration.php b/VmMigration/src/V1/MigratingVm/Expiration.php similarity index 96% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/Expiration.php rename to VmMigration/src/V1/MigratingVm/Expiration.php index 5360a02b046b..7d7f93c1dd81 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/Expiration.php +++ b/VmMigration/src/V1/MigratingVm/Expiration.php @@ -143,6 +143,4 @@ public function setExtendable($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Expiration::class, \Google\Cloud\VMMigration\V1\MigratingVm_Expiration::class); diff --git a/VmMigration/src/V1/MigratingVm/State.php b/VmMigration/src/V1/MigratingVm/State.php index 5f5cf5e24374..2c8e5ae37f32 100644 --- a/VmMigration/src/V1/MigratingVm/State.php +++ b/VmMigration/src/V1/MigratingVm/State.php @@ -91,6 +91,21 @@ class State * Generated from protobuf enum ERROR = 13; */ const ERROR = 13; + /** + * The migrating VM has passed its expiration date. It might be possible to + * bring it back to "Active" state by updating the TTL field. For more + * information, see the documentation. + * + * Generated from protobuf enum EXPIRED = 14; + */ + const EXPIRED = 14; + /** + * The migrating VM's has been finalized and migration resources have been + * removed. + * + * Generated from protobuf enum FINALIZED_EXPIRED = 17; + */ + const FINALIZED_EXPIRED = 17; private static $valueToName = [ self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', @@ -105,6 +120,8 @@ class State self::FINALIZING => 'FINALIZING', self::FINALIZED => 'FINALIZED', self::ERROR => 'ERROR', + self::EXPIRED => 'EXPIRED', + self::FINALIZED_EXPIRED => 'FINALIZED_EXPIRED', ]; public static function name($value) diff --git a/VmMigration/src/V1/MigrationError/ErrorCode.php b/VmMigration/src/V1/MigrationError/ErrorCode.php index 2cd0a605d277..21c98c8b6237 100644 --- a/VmMigration/src/V1/MigrationError/ErrorCode.php +++ b/VmMigration/src/V1/MigrationError/ErrorCode.php @@ -20,61 +20,78 @@ class ErrorCode */ const ERROR_CODE_UNSPECIFIED = 0; /** - * Migrate for Compute encountered an unknown error. + * Migrate to Virtual Machines 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. + * Migrate to Virtual Machines 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. + * Migrate to Virtual Machines 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. + * Migrate to Virtual Machines 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. + * Migrate to Virtual Machines 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. + * Migrate to Virtual Machines 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. + * Migrate to Virtual Machines 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. + * Migrate to Virtual Machines 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. + * Migrate to Virtual Machines encountered an error during appliance + * upgrade. * * Generated from protobuf enum APPLIANCE_UPGRADE_ERROR = 9; */ const APPLIANCE_UPGRADE_ERROR = 9; + /** + * Migrate to Virtual Machines encountered an error in image import + * operation. + * + * Generated from protobuf enum IMAGE_IMPORT_ERROR = 10; + */ + const IMAGE_IMPORT_ERROR = 10; + /** + * Migrate to Virtual Machines encountered an error in disk migration + * operation. + * + * Generated from protobuf enum DISK_MIGRATION_ERROR = 11; + */ + const DISK_MIGRATION_ERROR = 11; private static $valueToName = [ self::ERROR_CODE_UNSPECIFIED => 'ERROR_CODE_UNSPECIFIED', @@ -87,6 +104,8 @@ class ErrorCode self::CUTOVER_ERROR => 'CUTOVER_ERROR', self::UTILIZATION_REPORT_ERROR => 'UTILIZATION_REPORT_ERROR', self::APPLIANCE_UPGRADE_ERROR => 'APPLIANCE_UPGRADE_ERROR', + self::IMAGE_IMPORT_ERROR => 'IMAGE_IMPORT_ERROR', + self::DISK_MIGRATION_ERROR => 'DISK_MIGRATION_ERROR', ]; public static function name($value) diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationWarning.php b/VmMigration/src/V1/MigrationWarning.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationWarning.php rename to VmMigration/src/V1/MigrationWarning.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationWarning/WarningCode.php b/VmMigration/src/V1/MigrationWarning/WarningCode.php similarity index 89% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationWarning/WarningCode.php rename to VmMigration/src/V1/MigrationWarning/WarningCode.php index 29076ae15ad8..ea7c0b47b3c8 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationWarning/WarningCode.php +++ b/VmMigration/src/V1/MigrationWarning/WarningCode.php @@ -52,6 +52,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(WarningCode::class, \Google\Cloud\VMMigration\V1\MigrationWarning_WarningCode::class); diff --git a/VmMigration/src/V1/NetworkInterface.php b/VmMigration/src/V1/NetworkInterface.php index e70ad652db3a..2da4d08f8b54 100644 --- a/VmMigration/src/V1/NetworkInterface.php +++ b/VmMigration/src/V1/NetworkInterface.php @@ -16,31 +16,39 @@ class NetworkInterface extends \Google\Protobuf\Internal\Message { /** - * The network to connect the NIC to. + * Optional. The network to connect the NIC to. * - * Generated from protobuf field string network = 1; + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; */ protected $network = ''; /** - * The subnetwork to connect the NIC to. + * Optional. The subnetwork to connect the NIC to. * - * Generated from protobuf field string subnetwork = 2; + * Generated from protobuf field string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; */ protected $subnetwork = ''; /** - * The internal IP to define in the NIC. + * Optional. 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; + * Generated from protobuf field string internal_ip = 3 [(.google.api.field_behavior) = OPTIONAL]; */ protected $internal_ip = ''; /** - * The external IP to define in the NIC. + * Optional. The external IP to define in the NIC. * - * Generated from protobuf field string external_ip = 4; + * Generated from protobuf field string external_ip = 4 [(.google.api.field_behavior) = OPTIONAL]; */ protected $external_ip = ''; + /** + * Optional. The networking tier used for optimizing connectivity between + * instances and systems on the internet. Applies only for external ephemeral + * IP addresses. If left empty, will default to PREMIUM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineNetworkTier network_tier = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $network_tier = 0; /** * Constructor. @@ -49,15 +57,19 @@ class NetworkInterface extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type string $network - * The network to connect the NIC to. + * Optional. The network to connect the NIC to. * @type string $subnetwork - * The subnetwork to connect the NIC to. + * Optional. The subnetwork to connect the NIC to. * @type string $internal_ip - * The internal IP to define in the NIC. + * Optional. 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. + * Optional. The external IP to define in the NIC. + * @type int $network_tier + * Optional. The networking tier used for optimizing connectivity between + * instances and systems on the internet. Applies only for external ephemeral + * IP addresses. If left empty, will default to PREMIUM. * } */ public function __construct($data = NULL) { @@ -66,9 +78,9 @@ public function __construct($data = NULL) { } /** - * The network to connect the NIC to. + * Optional. The network to connect the NIC to. * - * Generated from protobuf field string network = 1; + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getNetwork() @@ -77,9 +89,9 @@ public function getNetwork() } /** - * The network to connect the NIC to. + * Optional. The network to connect the NIC to. * - * Generated from protobuf field string network = 1; + * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -92,9 +104,9 @@ public function setNetwork($var) } /** - * The subnetwork to connect the NIC to. + * Optional. The subnetwork to connect the NIC to. * - * Generated from protobuf field string subnetwork = 2; + * Generated from protobuf field string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getSubnetwork() @@ -103,9 +115,9 @@ public function getSubnetwork() } /** - * The subnetwork to connect the NIC to. + * Optional. The subnetwork to connect the NIC to. * - * Generated from protobuf field string subnetwork = 2; + * Generated from protobuf field string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -118,11 +130,11 @@ public function setSubnetwork($var) } /** - * The internal IP to define in the NIC. + * Optional. 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; + * Generated from protobuf field string internal_ip = 3 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getInternalIp() @@ -131,11 +143,11 @@ public function getInternalIp() } /** - * The internal IP to define in the NIC. + * Optional. 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; + * Generated from protobuf field string internal_ip = 3 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -148,9 +160,9 @@ public function setInternalIp($var) } /** - * The external IP to define in the NIC. + * Optional. The external IP to define in the NIC. * - * Generated from protobuf field string external_ip = 4; + * Generated from protobuf field string external_ip = 4 [(.google.api.field_behavior) = OPTIONAL]; * @return string */ public function getExternalIp() @@ -159,9 +171,9 @@ public function getExternalIp() } /** - * The external IP to define in the NIC. + * Optional. The external IP to define in the NIC. * - * Generated from protobuf field string external_ip = 4; + * Generated from protobuf field string external_ip = 4 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var * @return $this */ @@ -173,5 +185,35 @@ public function setExternalIp($var) return $this; } + /** + * Optional. The networking tier used for optimizing connectivity between + * instances and systems on the internet. Applies only for external ephemeral + * IP addresses. If left empty, will default to PREMIUM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineNetworkTier network_tier = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getNetworkTier() + { + return $this->network_tier; + } + + /** + * Optional. The networking tier used for optimizing connectivity between + * instances and systems on the internet. Applies only for external ephemeral + * IP addresses. If left empty, will default to PREMIUM. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineNetworkTier network_tier = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setNetworkTier($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineNetworkTier::class); + $this->network_tier = $var; + + return $this; + } + } diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/OsCapability.php b/VmMigration/src/V1/OsCapability.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/OsCapability.php rename to VmMigration/src/V1/OsCapability.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PersistentDisk.php b/VmMigration/src/V1/PersistentDisk.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PersistentDisk.php rename to VmMigration/src/V1/PersistentDisk.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PersistentDiskDefaults.php b/VmMigration/src/V1/PersistentDiskDefaults.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/PersistentDiskDefaults.php rename to VmMigration/src/V1/PersistentDiskDefaults.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ProvisioningTargetDiskStep.php b/VmMigration/src/V1/ProvisioningTargetDiskStep.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ProvisioningTargetDiskStep.php rename to VmMigration/src/V1/ProvisioningTargetDiskStep.php diff --git a/VmMigration/src/V1/ReplicationCycle.php b/VmMigration/src/V1/ReplicationCycle.php index ce03d8b59e45..639b3d34f93e 100644 --- a/VmMigration/src/V1/ReplicationCycle.php +++ b/VmMigration/src/V1/ReplicationCycle.php @@ -68,11 +68,18 @@ class ReplicationCycle extends \Google\Protobuf\Internal\Message */ protected $state = 0; /** - * Provides details on the state of the cycle in case of an error. + * Output only. Provides details on the state of the cycle in case of an + * error. * - * Generated from protobuf field .google.rpc.Status error = 12; + * Generated from protobuf field .google.rpc.Status error = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $error = null; + /** + * Output only. Warnings that occurred during the cycle. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigrationWarning warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $warnings; /** * Constructor. @@ -99,7 +106,10 @@ class ReplicationCycle extends \Google\Protobuf\Internal\Message * @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. + * Output only. Provides details on the state of the cycle in case of an + * error. + * @type array<\Google\Cloud\VMMigration\V1\MigrationWarning>|\Google\Protobuf\Internal\RepeatedField $warnings + * Output only. Warnings that occurred during the cycle. * } */ public function __construct($data = NULL) { @@ -356,9 +366,10 @@ public function setState($var) } /** - * Provides details on the state of the cycle in case of an error. + * Output only. Provides details on the state of the cycle in case of an + * error. * - * Generated from protobuf field .google.rpc.Status error = 12; + * Generated from protobuf field .google.rpc.Status error = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Rpc\Status|null */ public function getError() @@ -377,9 +388,10 @@ public function clearError() } /** - * Provides details on the state of the cycle in case of an error. + * Output only. Provides details on the state of the cycle in case of an + * error. * - * Generated from protobuf field .google.rpc.Status error = 12; + * Generated from protobuf field .google.rpc.Status error = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Rpc\Status $var * @return $this */ @@ -391,5 +403,31 @@ public function setError($var) return $this; } + /** + * Output only. Warnings that occurred during the cycle. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigrationWarning warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWarnings() + { + return $this->warnings; + } + + /** + * Output only. Warnings that occurred during the cycle. + * + * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigrationWarning warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Cloud\VMMigration\V1\MigrationWarning>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWarnings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\MigrationWarning::class); + $this->warnings = $arr; + + return $this; + } + } diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RunDiskMigrationJobRequest.php b/VmMigration/src/V1/RunDiskMigrationJobRequest.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RunDiskMigrationJobRequest.php rename to VmMigration/src/V1/RunDiskMigrationJobRequest.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RunDiskMigrationJobResponse.php b/VmMigration/src/V1/RunDiskMigrationJobResponse.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/RunDiskMigrationJobResponse.php rename to VmMigration/src/V1/RunDiskMigrationJobResponse.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ServiceAccount.php b/VmMigration/src/V1/ServiceAccount.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ServiceAccount.php rename to VmMigration/src/V1/ServiceAccount.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShieldedInstanceConfig.php b/VmMigration/src/V1/ShieldedInstanceConfig.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShieldedInstanceConfig.php rename to VmMigration/src/V1/ShieldedInstanceConfig.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShieldedInstanceConfig/SecureBoot.php b/VmMigration/src/V1/ShieldedInstanceConfig/SecureBoot.php similarity index 90% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShieldedInstanceConfig/SecureBoot.php rename to VmMigration/src/V1/ShieldedInstanceConfig/SecureBoot.php index 320c9523e4c1..e2036e4b5263 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ShieldedInstanceConfig/SecureBoot.php +++ b/VmMigration/src/V1/ShieldedInstanceConfig/SecureBoot.php @@ -61,6 +61,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SecureBoot::class, \Google\Cloud\VMMigration\V1\ShieldedInstanceConfig_SecureBoot::class); diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SkipOsAdaptation.php b/VmMigration/src/V1/SkipOsAdaptation.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SkipOsAdaptation.php rename to VmMigration/src/V1/SkipOsAdaptation.php diff --git a/VmMigration/src/V1/Source.php b/VmMigration/src/V1/Source.php index ae1ab78c28ca..64e8c843ffe2 100644 --- a/VmMigration/src/V1/Source.php +++ b/VmMigration/src/V1/Source.php @@ -46,6 +46,13 @@ class Source extends \Google\Protobuf\Internal\Message * Generated from protobuf field string description = 6; */ protected $description = ''; + /** + * Optional. Immutable. The encryption details of the source data stored by + * the service. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $encryption = null; protected $source_details; /** @@ -58,6 +65,8 @@ class Source extends \Google\Protobuf\Internal\Message * Vmware type source details. * @type \Google\Cloud\VMMigration\V1\AwsSourceDetails $aws * AWS type source details. + * @type \Google\Cloud\VMMigration\V1\AzureSourceDetails $azure + * Azure type source details. * @type string $name * Output only. The Source name. * @type \Google\Protobuf\Timestamp $create_time @@ -68,6 +77,9 @@ class Source extends \Google\Protobuf\Internal\Message * The labels of the source. * @type string $description * User-provided description of the source. + * @type \Google\Cloud\VMMigration\V1\Encryption $encryption + * Optional. Immutable. The encryption details of the source data stored by + * the service. * } */ public function __construct($data = NULL) { @@ -137,6 +149,37 @@ public function setAws($var) return $this; } + /** + * Azure type source details. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureSourceDetails azure = 13; + * @return \Google\Cloud\VMMigration\V1\AzureSourceDetails|null + */ + public function getAzure() + { + return $this->readOneof(13); + } + + public function hasAzure() + { + return $this->hasOneof(13); + } + + /** + * Azure type source details. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.AzureSourceDetails azure = 13; + * @param \Google\Cloud\VMMigration\V1\AzureSourceDetails $var + * @return $this + */ + public function setAzure($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AzureSourceDetails::class); + $this->writeOneof(13, $var); + + return $this; + } + /** * Output only. The Source name. * @@ -287,6 +330,44 @@ public function setDescription($var) return $this; } + /** + * Optional. Immutable. The encryption details of the source data stored by + * the service. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\VMMigration\V1\Encryption|null + */ + public function getEncryption() + { + return $this->encryption; + } + + public function hasEncryption() + { + return isset($this->encryption); + } + + public function clearEncryption() + { + unset($this->encryption); + } + + /** + * Optional. Immutable. The encryption details of the source data stored by + * the service. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\VMMigration\V1\Encryption $var + * @return $this + */ + public function setEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Encryption::class); + $this->encryption = $var; + + return $this; + } + /** * @return string */ diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SourceStorageResource.php b/VmMigration/src/V1/SourceStorageResource.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/SourceStorageResource.php rename to VmMigration/src/V1/SourceStorageResource.php diff --git a/VmMigration/src/V1/TargetProject.php b/VmMigration/src/V1/TargetProject.php index d19fb184997d..0873fbf6555d 100644 --- a/VmMigration/src/V1/TargetProject.php +++ b/VmMigration/src/V1/TargetProject.php @@ -23,9 +23,9 @@ class TargetProject extends \Google\Protobuf\Internal\Message */ protected $name = ''; /** - * The target project ID (number) or project name. + * Required. The target project ID (number) or project name. * - * Generated from protobuf field string project = 2; + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; */ protected $project = ''; /** @@ -57,7 +57,7 @@ class TargetProject extends \Google\Protobuf\Internal\Message * @type string $name * Output only. The name of the target project. * @type string $project - * The target project ID (number) or project name. + * Required. The target project ID (number) or project name. * @type string $description * The target project's description. * @type \Google\Protobuf\Timestamp $create_time @@ -99,9 +99,9 @@ public function setName($var) } /** - * The target project ID (number) or project name. + * Required. The target project ID (number) or project name. * - * Generated from protobuf field string project = 2; + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; * @return string */ public function getProject() @@ -110,9 +110,9 @@ public function getProject() } /** - * The target project ID (number) or project name. + * Required. The target project ID (number) or project name. * - * Generated from protobuf field string project = 2; + * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; * @param string $var * @return $this */ diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateDiskMigrationJobRequest.php b/VmMigration/src/V1/UpdateDiskMigrationJobRequest.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpdateDiskMigrationJobRequest.php rename to VmMigration/src/V1/UpdateDiskMigrationJobRequest.php diff --git a/VmMigration/src/V1/UpdateGroupRequest.php b/VmMigration/src/V1/UpdateGroupRequest.php index c3566d1bd515..aee8dc2cfe74 100644 --- a/VmMigration/src/V1/UpdateGroupRequest.php +++ b/VmMigration/src/V1/UpdateGroupRequest.php @@ -36,8 +36,8 @@ class UpdateGroupRequest extends \Google\Protobuf\Internal\Message * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -86,8 +86,8 @@ public static function build(\Google\Cloud\VMMigration\V1\Group $group, \Google\ * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -185,8 +185,8 @@ public function setGroup($var) * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -206,8 +206,8 @@ public function getRequestId() * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. diff --git a/VmMigration/src/V1/UpdateMigratingVmRequest.php b/VmMigration/src/V1/UpdateMigratingVmRequest.php index 4dc83e8dfef2..ece9ca29fdc3 100644 --- a/VmMigration/src/V1/UpdateMigratingVmRequest.php +++ b/VmMigration/src/V1/UpdateMigratingVmRequest.php @@ -36,8 +36,8 @@ class UpdateMigratingVmRequest extends \Google\Protobuf\Internal\Message * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -86,8 +86,8 @@ public static function build(\Google\Cloud\VMMigration\V1\MigratingVm $migrating * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -185,8 +185,8 @@ public function setMigratingVm($var) * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -206,8 +206,8 @@ public function getRequestId() * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. diff --git a/VmMigration/src/V1/UpdateSourceRequest.php b/VmMigration/src/V1/UpdateSourceRequest.php index 6fedf6b84370..ceda1257271e 100644 --- a/VmMigration/src/V1/UpdateSourceRequest.php +++ b/VmMigration/src/V1/UpdateSourceRequest.php @@ -36,8 +36,8 @@ class UpdateSourceRequest extends \Google\Protobuf\Internal\Message * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -86,8 +86,8 @@ public static function build(\Google\Cloud\VMMigration\V1\Source $source, \Googl * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -185,8 +185,8 @@ public function setSource($var) * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -206,8 +206,8 @@ public function getRequestId() * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. diff --git a/VmMigration/src/V1/UpdateTargetProjectRequest.php b/VmMigration/src/V1/UpdateTargetProjectRequest.php index 64f7eaec9709..ae1b70e4fbe9 100644 --- a/VmMigration/src/V1/UpdateTargetProjectRequest.php +++ b/VmMigration/src/V1/UpdateTargetProjectRequest.php @@ -36,8 +36,8 @@ class UpdateTargetProjectRequest extends \Google\Protobuf\Internal\Message * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -86,8 +86,8 @@ public static function build(\Google\Cloud\VMMigration\V1\TargetProject $targetP * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -185,8 +185,8 @@ public function setTargetProject($var) * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -206,8 +206,8 @@ public function getRequestId() * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. diff --git a/VmMigration/src/V1/UpgradeApplianceRequest.php b/VmMigration/src/V1/UpgradeApplianceRequest.php index ceb9df3af2cf..b30ae788955e 100644 --- a/VmMigration/src/V1/UpgradeApplianceRequest.php +++ b/VmMigration/src/V1/UpgradeApplianceRequest.php @@ -26,8 +26,8 @@ class UpgradeApplianceRequest extends \Google\Protobuf\Internal\Message * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -51,8 +51,8 @@ class UpgradeApplianceRequest extends \Google\Protobuf\Internal\Message * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -96,8 +96,8 @@ public function setDatacenterConnector($var) * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. @@ -117,8 +117,8 @@ public function getRequestId() * so that if you must retry your request, 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 + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request * ID, the server can check if original operation with the same request ID * was received, and if so, will ignore the second request. This prevents * clients from accidentally creating duplicate commitments. diff --git a/VmMigration/src/V1/UpgradeStatus.php b/VmMigration/src/V1/UpgradeStatus.php index ed6bf097167b..de974a62e49f 100644 --- a/VmMigration/src/V1/UpgradeStatus.php +++ b/VmMigration/src/V1/UpgradeStatus.php @@ -28,9 +28,10 @@ class UpgradeStatus extends \Google\Protobuf\Internal\Message */ protected $state = 0; /** - * Provides details on the state of the upgrade operation in case of an error. + * Output only. Provides details on the state of the upgrade operation in case + * of an error. * - * Generated from protobuf field .google.rpc.Status error = 3; + * Generated from protobuf field .google.rpc.Status error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $error = null; /** @@ -57,7 +58,8 @@ class UpgradeStatus extends \Google\Protobuf\Internal\Message * @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. + * Output only. 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 @@ -122,9 +124,10 @@ public function setState($var) } /** - * Provides details on the state of the upgrade operation in case of an error. + * Output only. Provides details on the state of the upgrade operation in case + * of an error. * - * Generated from protobuf field .google.rpc.Status error = 3; + * Generated from protobuf field .google.rpc.Status error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @return \Google\Rpc\Status|null */ public function getError() @@ -143,9 +146,10 @@ public function clearError() } /** - * Provides details on the state of the upgrade operation in case of an error. + * Output only. Provides details on the state of the upgrade operation in case + * of an error. * - * Generated from protobuf field .google.rpc.Status error = 3; + * Generated from protobuf field .google.rpc.Status error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * @param \Google\Rpc\Status $var * @return $this */ diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmArchitecture.php b/VmMigration/src/V1/VmArchitecture.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmArchitecture.php rename to VmMigration/src/V1/VmArchitecture.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmAttachmentDetails.php b/VmMigration/src/V1/VmAttachmentDetails.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmAttachmentDetails.php rename to VmMigration/src/V1/VmAttachmentDetails.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmCapabilities.php b/VmMigration/src/V1/VmCapabilities.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmCapabilities.php rename to VmMigration/src/V1/VmCapabilities.php diff --git a/VmMigration/src/V1/VmwareSourceDetails.php b/VmMigration/src/V1/VmwareSourceDetails.php index 751c4aebdc1a..a1382ea205c4 100644 --- a/VmMigration/src/V1/VmwareSourceDetails.php +++ b/VmMigration/src/V1/VmwareSourceDetails.php @@ -41,6 +41,12 @@ class VmwareSourceDetails extends \Google\Protobuf\Internal\Message * Generated from protobuf field string thumbprint = 4; */ protected $thumbprint = ''; + /** + * The hostname of the vcenter. + * + * Generated from protobuf field string resolved_vcenter_host = 5; + */ + protected $resolved_vcenter_host = ''; /** * Constructor. @@ -57,6 +63,8 @@ class VmwareSourceDetails extends \Google\Protobuf\Internal\Message * The ip address of the vcenter this Source represents. * @type string $thumbprint * The thumbprint representing the certificate for the vcenter. + * @type string $resolved_vcenter_host + * The hostname of the vcenter. * } */ public function __construct($data = NULL) { @@ -170,5 +178,31 @@ public function setThumbprint($var) return $this; } + /** + * The hostname of the vcenter. + * + * Generated from protobuf field string resolved_vcenter_host = 5; + * @return string + */ + public function getResolvedVcenterHost() + { + return $this->resolved_vcenter_host; + } + + /** + * The hostname of the vcenter. + * + * Generated from protobuf field string resolved_vcenter_host = 5; + * @param string $var + * @return $this + */ + public function setResolvedVcenterHost($var) + { + GPBUtil::checkString($var, True); + $this->resolved_vcenter_host = $var; + + return $this; + } + } diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceVmDetails.php b/VmMigration/src/V1/VmwareSourceVmDetails.php similarity index 100% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceVmDetails.php rename to VmMigration/src/V1/VmwareSourceVmDetails.php diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceVmDetails/Firmware.php b/VmMigration/src/V1/VmwareSourceVmDetails/Firmware.php similarity index 89% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceVmDetails/Firmware.php rename to VmMigration/src/V1/VmwareSourceVmDetails/Firmware.php index 86ec4c0d0c34..3f8eb0a8a3b7 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceVmDetails/Firmware.php +++ b/VmMigration/src/V1/VmwareSourceVmDetails/Firmware.php @@ -59,6 +59,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Firmware::class, \Google\Cloud\VMMigration\V1\VmwareSourceVmDetails_Firmware::class); diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceVmDetails/VmwareDiskDetails.php b/VmMigration/src/V1/VmwareSourceVmDetails/VmwareDiskDetails.php similarity index 94% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceVmDetails/VmwareDiskDetails.php rename to VmMigration/src/V1/VmwareSourceVmDetails/VmwareDiskDetails.php index 8e8ffdf594bc..3dfab9434f88 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceVmDetails/VmwareDiskDetails.php +++ b/VmMigration/src/V1/VmwareSourceVmDetails/VmwareDiskDetails.php @@ -133,6 +133,4 @@ public function setLabel($var) } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VmwareDiskDetails::class, \Google\Cloud\VMMigration\V1\VmwareSourceVmDetails_VmwareDiskDetails::class); diff --git a/VmMigration/src/V1/VmwareVmDetails.php b/VmMigration/src/V1/VmwareVmDetails.php index d35cf1bfd3eb..ac8e71353c47 100644 --- a/VmMigration/src/V1/VmwareVmDetails.php +++ b/VmMigration/src/V1/VmwareVmDetails.php @@ -90,6 +90,12 @@ class VmwareVmDetails extends \Google\Protobuf\Internal\Message * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.BootOption boot_option = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $boot_option = 0; + /** + * Output only. The CPU architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.VmArchitecture architecture = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $architecture = 0; /** * Constructor. @@ -124,6 +130,8 @@ class VmwareVmDetails extends \Google\Protobuf\Internal\Message * for types of strings this might hold. * @type int $boot_option * Output only. The VM Boot Option. + * @type int $architecture + * Output only. The CPU architecture. * } */ public function __construct($data = NULL) { @@ -449,5 +457,31 @@ public function setBootOption($var) return $this; } + /** + * Output only. The CPU architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.VmArchitecture architecture = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getArchitecture() + { + return $this->architecture; + } + + /** + * Output only. The CPU architecture. + * + * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.VmArchitecture architecture = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setArchitecture($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\VmwareVmDetails\VmArchitecture::class); + $this->architecture = $var; + + return $this; + } + } diff --git a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/VmArchitecture.php b/VmMigration/src/V1/VmwareVmDetails/VmArchitecture.php similarity index 90% rename from owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/VmArchitecture.php rename to VmMigration/src/V1/VmwareVmDetails/VmArchitecture.php index a7e69e768cd3..8d39d8b7d3b1 100644 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails/VmArchitecture.php +++ b/VmMigration/src/V1/VmwareVmDetails/VmArchitecture.php @@ -59,6 +59,4 @@ public static function value($name) } } -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VmArchitecture::class, \Google\Cloud\VMMigration\V1\VmwareVmDetails_VmArchitecture::class); diff --git a/VmMigration/src/V1/gapic_metadata.json b/VmMigration/src/V1/gapic_metadata.json index 6a432b19446a..079a61db5e12 100644 --- a/VmMigration/src/V1/gapic_metadata.json +++ b/VmMigration/src/V1/gapic_metadata.json @@ -25,6 +25,16 @@ "cancelCutoverJob" ] }, + "CancelDiskMigrationJob": { + "methods": [ + "cancelDiskMigrationJob" + ] + }, + "CancelImageImportJob": { + "methods": [ + "cancelImageImportJob" + ] + }, "CreateCloneJob": { "methods": [ "createCloneJob" @@ -40,11 +50,21 @@ "createDatacenterConnector" ] }, + "CreateDiskMigrationJob": { + "methods": [ + "createDiskMigrationJob" + ] + }, "CreateGroup": { "methods": [ "createGroup" ] }, + "CreateImageImport": { + "methods": [ + "createImageImport" + ] + }, "CreateMigratingVm": { "methods": [ "createMigratingVm" @@ -70,11 +90,21 @@ "deleteDatacenterConnector" ] }, + "DeleteDiskMigrationJob": { + "methods": [ + "deleteDiskMigrationJob" + ] + }, "DeleteGroup": { "methods": [ "deleteGroup" ] }, + "DeleteImageImport": { + "methods": [ + "deleteImageImport" + ] + }, "DeleteMigratingVm": { "methods": [ "deleteMigratingVm" @@ -95,11 +125,21 @@ "deleteUtilizationReport" ] }, + "ExtendMigration": { + "methods": [ + "extendMigration" + ] + }, "FetchInventory": { "methods": [ "fetchInventory" ] }, + "FetchStorageInventory": { + "methods": [ + "fetchStorageInventory" + ] + }, "FinalizeMigration": { "methods": [ "finalizeMigration" @@ -120,11 +160,26 @@ "getDatacenterConnector" ] }, + "GetDiskMigrationJob": { + "methods": [ + "getDiskMigrationJob" + ] + }, "GetGroup": { "methods": [ "getGroup" ] }, + "GetImageImport": { + "methods": [ + "getImageImport" + ] + }, + "GetImageImportJob": { + "methods": [ + "getImageImportJob" + ] + }, "GetMigratingVm": { "methods": [ "getMigratingVm" @@ -165,11 +220,26 @@ "listDatacenterConnectors" ] }, + "ListDiskMigrationJobs": { + "methods": [ + "listDiskMigrationJobs" + ] + }, "ListGroups": { "methods": [ "listGroups" ] }, + "ListImageImportJobs": { + "methods": [ + "listImageImportJobs" + ] + }, + "ListImageImports": { + "methods": [ + "listImageImports" + ] + }, "ListMigratingVms": { "methods": [ "listMigratingVms" @@ -210,11 +280,21 @@ "resumeMigration" ] }, + "RunDiskMigrationJob": { + "methods": [ + "runDiskMigrationJob" + ] + }, "StartMigration": { "methods": [ "startMigration" ] }, + "UpdateDiskMigrationJob": { + "methods": [ + "updateDiskMigrationJob" + ] + }, "UpdateGroup": { "methods": [ "updateGroup" diff --git a/VmMigration/src/V1/resources/vm_migration_client_config.json b/VmMigration/src/V1/resources/vm_migration_client_config.json index 51f53c73dcb5..9cb301193296 100644 --- a/VmMigration/src/V1/resources/vm_migration_client_config.json +++ b/VmMigration/src/V1/resources/vm_migration_client_config.json @@ -61,6 +61,16 @@ "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "CancelDiskMigrationJob": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CancelImageImportJob": { + "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", @@ -76,11 +86,21 @@ "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "CreateDiskMigrationJob": { + "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" }, + "CreateImageImport": { + "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", @@ -106,11 +126,21 @@ "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "DeleteDiskMigrationJob": { + "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" }, + "DeleteImageImport": { + "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", @@ -131,11 +161,21 @@ "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "ExtendMigration": { + "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" }, + "FetchStorageInventory": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, "FinalizeMigration": { "timeout_millis": 60000, "retry_codes_name": "no_retry_1_codes", @@ -156,11 +196,26 @@ "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "GetDiskMigrationJob": { + "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" }, + "GetImageImport": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetImageImportJob": { + "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", @@ -201,11 +256,26 @@ "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "ListDiskMigrationJobs": { + "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" }, + "ListImageImportJobs": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListImageImports": { + "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", @@ -246,11 +316,21 @@ "retry_codes_name": "no_retry_1_codes", "retry_params_name": "no_retry_1_params" }, + "RunDiskMigrationJob": { + "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" }, + "UpdateDiskMigrationJob": { + "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", diff --git a/VmMigration/src/V1/resources/vm_migration_descriptor_config.php b/VmMigration/src/V1/resources/vm_migration_descriptor_config.php index 7a4fee565d72..9c7e1b03e819 100644 --- a/VmMigration/src/V1/resources/vm_migration_descriptor_config.php +++ b/VmMigration/src/V1/resources/vm_migration_descriptor_config.php @@ -80,6 +80,44 @@ ], ], ], + 'CancelDiskMigrationJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CancelDiskMigrationJobResponse', + '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', + ], + ], + ], + ], + 'CancelImageImportJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CancelImageImportJobResponse', + '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', @@ -137,6 +175,25 @@ ], ], ], + 'CreateDiskMigrationJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\DiskMigrationJob', + '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', @@ -156,6 +213,25 @@ ], ], ], + 'CreateImageImport' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\ImageImport', + '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', @@ -251,6 +327,25 @@ ], ], ], + 'DeleteDiskMigrationJob' => [ + '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', @@ -270,6 +365,25 @@ ], ], ], + 'DeleteImageImport' => [ + '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', @@ -346,6 +460,25 @@ ], ], ], + 'ExtendMigration' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\ExtendMigrationResponse', + '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', + ], + ], + ], + ], 'FinalizeMigration' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\VMMigration\V1\FinalizeMigrationResponse', @@ -422,6 +555,25 @@ ], ], ], + 'RunDiskMigrationJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\RunDiskMigrationJobResponse', + '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', + ], + ], + ], + ], 'StartMigration' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\VMMigration\V1\StartMigrationResponse', @@ -441,6 +593,26 @@ ], ], ], + 'UpdateDiskMigrationJob' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VMMigration\V1\DiskMigrationJob', + 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'disk_migration_job.name', + 'fieldAccessors' => [ + 'getDiskMigrationJob', + 'getName', + ], + ], + ], + ], 'UpdateGroup' => [ 'longRunning' => [ 'operationReturnType' => '\Google\Cloud\VMMigration\V1\Group', @@ -552,6 +724,26 @@ ], ], ], + 'FetchStorageInventory' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getResources', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\FetchStorageInventoryResponse', + 'headerParams' => [ + [ + 'keyName' => 'source', + 'fieldAccessors' => [ + 'getSource', + ], + ], + ], + ], 'GetCloneJob' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\VMMigration\V1\CloneJob', @@ -588,6 +780,18 @@ ], ], ], + 'GetDiskMigrationJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\DiskMigrationJob', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'GetGroup' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\VMMigration\V1\Group', @@ -600,6 +804,30 @@ ], ], ], + 'GetImageImport' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ImageImport', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetImageImportJob' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ImageImportJob', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'GetMigratingVm' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\VMMigration\V1\MigratingVm', @@ -720,6 +948,26 @@ ], ], ], + 'ListDiskMigrationJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDiskMigrationJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListDiskMigrationJobsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'ListGroups' => [ 'pageStreaming' => [ 'requestPageTokenGetMethod' => 'getPageToken', @@ -740,6 +988,46 @@ ], ], ], + 'ListImageImportJobs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getImageImportJobs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListImageImportJobsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListImageImports' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getImageImports', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VMMigration\V1\ListImageImportsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], 'ListMigratingVms' => [ 'pageStreaming' => [ 'requestPageTokenGetMethod' => 'getPageToken', @@ -876,12 +1164,18 @@ ], 'templateMap' => [ 'cloneJob' => 'projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cloneJobs/{clone_job}', + 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', 'cutoverJob' => 'projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job}', 'datacenterConnector' => 'projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector}', + 'diskMigrationJob' => 'projects/{project}/locations/{location}/sources/{source}/diskMigrationJobs/{disk_migration_job}', 'group' => 'projects/{project}/locations/{location}/groups/{group}', + 'image' => 'projects/{project}/global/images/{image}', + 'imageImport' => 'projects/{project}/locations/{location}/imageImports/{job}', + 'imageImportJob' => 'projects/{project}/locations/{location}/imageImports/{job}/imageImportJobs/{result}', '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}', + 'serviceAccount' => 'projects/{project}/serviceAccounts/{service_account}', '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/VmMigration/src/V1/resources/vm_migration_rest_client_config.php b/VmMigration/src/V1/resources/vm_migration_rest_client_config.php index a548189e98dc..87656f0d3441 100644 --- a/VmMigration/src/V1/resources/vm_migration_rest_client_config.php +++ b/VmMigration/src/V1/resources/vm_migration_rest_client_config.php @@ -83,6 +83,30 @@ ], ], ], + 'CancelDiskMigrationJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/diskMigrationJobs/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CancelImageImportJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/imageImports/*/imageImportJobs/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'CreateCloneJob' => [ 'method' => 'post', 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*/migratingVms/*}/cloneJobs', @@ -128,6 +152,21 @@ 'datacenter_connector_id', ], ], + 'CreateDiskMigrationJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/diskMigrationJobs', + 'body' => 'disk_migration_job', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'disk_migration_job_id', + ], + ], 'CreateGroup' => [ 'method' => 'post', 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/groups', @@ -143,6 +182,21 @@ 'group_id', ], ], + 'CreateImageImport' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/imageImports', + 'body' => 'image_import', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'image_import_id', + ], + ], 'CreateMigratingVm' => [ 'method' => 'post', 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/migratingVms', @@ -214,6 +268,17 @@ ], ], ], + 'DeleteDiskMigrationJob' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/diskMigrationJobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'DeleteGroup' => [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/groups/*}', @@ -225,6 +290,17 @@ ], ], ], + 'DeleteImageImport' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/imageImports/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'DeleteMigratingVm' => [ 'method' => 'delete', 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*}', @@ -269,6 +345,18 @@ ], ], ], + 'ExtendMigration' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:extendMigration', + 'body' => '*', + 'placeholders' => [ + 'migrating_vm' => [ + 'getters' => [ + 'getMigratingVm', + ], + ], + ], + ], 'FetchInventory' => [ 'method' => 'get', 'uriTemplate' => '/v1/{source=projects/*/locations/*/sources/*}:fetchInventory', @@ -280,6 +368,17 @@ ], ], ], + 'FetchStorageInventory' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{source=projects/*/locations/*/sources/*}:fetchStorageInventory', + 'placeholders' => [ + 'source' => [ + 'getters' => [ + 'getSource', + ], + ], + ], + ], 'FinalizeMigration' => [ 'method' => 'post', 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:finalizeMigration', @@ -325,6 +424,17 @@ ], ], ], + 'GetDiskMigrationJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/diskMigrationJobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'GetGroup' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/groups/*}', @@ -336,6 +446,28 @@ ], ], ], + 'GetImageImport' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/imageImports/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetImageImportJob' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/imageImports/*/imageImportJobs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'GetMigratingVm' => [ 'method' => 'get', 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/migratingVms/*}', @@ -433,6 +565,17 @@ 'page_token', ], ], + 'ListDiskMigrationJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/diskMigrationJobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], 'ListGroups' => [ 'method' => 'get', 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/groups', @@ -447,6 +590,28 @@ 'page_token', ], ], + 'ListImageImportJobs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/imageImports/*}/imageImportJobs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListImageImports' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/imageImports', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], 'ListMigratingVms' => [ 'method' => 'get', 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/migratingVms', @@ -553,6 +718,18 @@ ], ], ], + 'RunDiskMigrationJob' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/diskMigrationJobs/*}:run', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], 'StartMigration' => [ 'method' => 'post', 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:startMigration', @@ -565,6 +742,19 @@ ], ], ], + 'UpdateDiskMigrationJob' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{disk_migration_job.name=projects/*/locations/*/sources/*/diskMigrationJobs/*}', + 'body' => 'disk_migration_job', + 'placeholders' => [ + 'disk_migration_job.name' => [ + 'getters' => [ + 'getDiskMigrationJob', + 'getName', + ], + ], + ], + ], 'UpdateGroup' => [ 'method' => 'patch', 'uriTemplate' => '/v1/{group.name=projects/*/locations/*/groups/*}', diff --git a/VmMigration/tests/Unit/V1/Client/VmMigrationClientTest.php b/VmMigration/tests/Unit/V1/Client/VmMigrationClientTest.php index 62134d1c851f..7672e89e18eb 100644 --- a/VmMigration/tests/Unit/V1/Client/VmMigrationClientTest.php +++ b/VmMigration/tests/Unit/V1/Client/VmMigrationClientTest.php @@ -36,12 +36,20 @@ use Google\Cloud\VMMigration\V1\CancelCloneJobResponse; use Google\Cloud\VMMigration\V1\CancelCutoverJobRequest; use Google\Cloud\VMMigration\V1\CancelCutoverJobResponse; +use Google\Cloud\VMMigration\V1\CancelDiskMigrationJobRequest; +use Google\Cloud\VMMigration\V1\CancelDiskMigrationJobResponse; +use Google\Cloud\VMMigration\V1\CancelImageImportJobRequest; +use Google\Cloud\VMMigration\V1\CancelImageImportJobResponse; use Google\Cloud\VMMigration\V1\Client\VmMigrationClient; use Google\Cloud\VMMigration\V1\CloneJob; +use Google\Cloud\VMMigration\V1\ComputeEngineDisk; +use Google\Cloud\VMMigration\V1\ComputeEngineDiskType; use Google\Cloud\VMMigration\V1\CreateCloneJobRequest; use Google\Cloud\VMMigration\V1\CreateCutoverJobRequest; use Google\Cloud\VMMigration\V1\CreateDatacenterConnectorRequest; +use Google\Cloud\VMMigration\V1\CreateDiskMigrationJobRequest; use Google\Cloud\VMMigration\V1\CreateGroupRequest; +use Google\Cloud\VMMigration\V1\CreateImageImportRequest; use Google\Cloud\VMMigration\V1\CreateMigratingVmRequest; use Google\Cloud\VMMigration\V1\CreateSourceRequest; use Google\Cloud\VMMigration\V1\CreateTargetProjectRequest; @@ -49,33 +57,53 @@ use Google\Cloud\VMMigration\V1\CutoverJob; use Google\Cloud\VMMigration\V1\DatacenterConnector; use Google\Cloud\VMMigration\V1\DeleteDatacenterConnectorRequest; +use Google\Cloud\VMMigration\V1\DeleteDiskMigrationJobRequest; use Google\Cloud\VMMigration\V1\DeleteGroupRequest; +use Google\Cloud\VMMigration\V1\DeleteImageImportRequest; use Google\Cloud\VMMigration\V1\DeleteMigratingVmRequest; use Google\Cloud\VMMigration\V1\DeleteSourceRequest; use Google\Cloud\VMMigration\V1\DeleteTargetProjectRequest; use Google\Cloud\VMMigration\V1\DeleteUtilizationReportRequest; +use Google\Cloud\VMMigration\V1\DiskMigrationJob; +use Google\Cloud\VMMigration\V1\DiskMigrationJobTargetDetails; +use Google\Cloud\VMMigration\V1\ExtendMigrationRequest; +use Google\Cloud\VMMigration\V1\ExtendMigrationResponse; use Google\Cloud\VMMigration\V1\FetchInventoryRequest; use Google\Cloud\VMMigration\V1\FetchInventoryResponse; +use Google\Cloud\VMMigration\V1\FetchStorageInventoryRequest; +use Google\Cloud\VMMigration\V1\FetchStorageInventoryRequest\StorageType; +use Google\Cloud\VMMigration\V1\FetchStorageInventoryResponse; use Google\Cloud\VMMigration\V1\FinalizeMigrationRequest; use Google\Cloud\VMMigration\V1\FinalizeMigrationResponse; use Google\Cloud\VMMigration\V1\GetCloneJobRequest; use Google\Cloud\VMMigration\V1\GetCutoverJobRequest; use Google\Cloud\VMMigration\V1\GetDatacenterConnectorRequest; +use Google\Cloud\VMMigration\V1\GetDiskMigrationJobRequest; use Google\Cloud\VMMigration\V1\GetGroupRequest; +use Google\Cloud\VMMigration\V1\GetImageImportJobRequest; +use Google\Cloud\VMMigration\V1\GetImageImportRequest; use Google\Cloud\VMMigration\V1\GetMigratingVmRequest; use Google\Cloud\VMMigration\V1\GetReplicationCycleRequest; use Google\Cloud\VMMigration\V1\GetSourceRequest; use Google\Cloud\VMMigration\V1\GetTargetProjectRequest; use Google\Cloud\VMMigration\V1\GetUtilizationReportRequest; use Google\Cloud\VMMigration\V1\Group; +use Google\Cloud\VMMigration\V1\ImageImport; +use Google\Cloud\VMMigration\V1\ImageImportJob; use Google\Cloud\VMMigration\V1\ListCloneJobsRequest; use Google\Cloud\VMMigration\V1\ListCloneJobsResponse; use Google\Cloud\VMMigration\V1\ListCutoverJobsRequest; use Google\Cloud\VMMigration\V1\ListCutoverJobsResponse; use Google\Cloud\VMMigration\V1\ListDatacenterConnectorsRequest; use Google\Cloud\VMMigration\V1\ListDatacenterConnectorsResponse; +use Google\Cloud\VMMigration\V1\ListDiskMigrationJobsRequest; +use Google\Cloud\VMMigration\V1\ListDiskMigrationJobsResponse; use Google\Cloud\VMMigration\V1\ListGroupsRequest; use Google\Cloud\VMMigration\V1\ListGroupsResponse; +use Google\Cloud\VMMigration\V1\ListImageImportJobsRequest; +use Google\Cloud\VMMigration\V1\ListImageImportJobsResponse; +use Google\Cloud\VMMigration\V1\ListImageImportsRequest; +use Google\Cloud\VMMigration\V1\ListImageImportsResponse; use Google\Cloud\VMMigration\V1\ListMigratingVmsRequest; use Google\Cloud\VMMigration\V1\ListMigratingVmsResponse; use Google\Cloud\VMMigration\V1\ListReplicationCyclesRequest; @@ -94,10 +122,14 @@ use Google\Cloud\VMMigration\V1\ReplicationCycle; use Google\Cloud\VMMigration\V1\ResumeMigrationRequest; use Google\Cloud\VMMigration\V1\ResumeMigrationResponse; +use Google\Cloud\VMMigration\V1\RunDiskMigrationJobRequest; +use Google\Cloud\VMMigration\V1\RunDiskMigrationJobResponse; use Google\Cloud\VMMigration\V1\Source; +use Google\Cloud\VMMigration\V1\SourceStorageResource; use Google\Cloud\VMMigration\V1\StartMigrationRequest; use Google\Cloud\VMMigration\V1\StartMigrationResponse; use Google\Cloud\VMMigration\V1\TargetProject; +use Google\Cloud\VMMigration\V1\UpdateDiskMigrationJobRequest; use Google\Cloud\VMMigration\V1\UpdateGroupRequest; use Google\Cloud\VMMigration\V1\UpdateMigratingVmRequest; use Google\Cloud\VMMigration\V1\UpdateSourceRequest; @@ -533,6 +565,260 @@ public function cancelCutoverJobExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } + /** @test */ + public function cancelDiskMigrationJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelDiskMigrationJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new CancelDiskMigrationJobResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/cancelDiskMigrationJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->diskMigrationJobName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[DISK_MIGRATION_JOB]' + ); + $request = (new CancelDiskMigrationJobRequest())->setName($formattedName); + $response = $gapicClient->cancelDiskMigrationJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->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/CancelDiskMigrationJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelDiskMigrationJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cancelDiskMigrationJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelDiskMigrationJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->diskMigrationJobName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[DISK_MIGRATION_JOB]' + ); + $request = (new CancelDiskMigrationJobRequest())->setName($formattedName); + $response = $gapicClient->cancelDiskMigrationJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelDiskMigrationJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cancelImageImportJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelImageImportJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new CancelImageImportJobResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/cancelImageImportJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->imageImportJobName('[PROJECT]', '[LOCATION]', '[JOB]', '[RESULT]'); + $request = (new CancelImageImportJobRequest())->setName($formattedName); + $response = $gapicClient->cancelImageImportJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->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/CancelImageImportJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelImageImportJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cancelImageImportJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cancelImageImportJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->imageImportJobName('[PROJECT]', '[LOCATION]', '[JOB]', '[RESULT]'); + $request = (new CancelImageImportJobRequest())->setName($formattedName); + $response = $gapicClient->cancelImageImportJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cancelImageImportJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->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() { @@ -964,7 +1250,7 @@ public function createDatacenterConnectorExceptionTest() } /** @test */ - public function createGroupTest() + public function createDiskMigrationJobTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -981,32 +1267,38 @@ public function createGroupTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGroupTest'); + $incompleteOperation->setName('operations/createDiskMigrationJobTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $name = 'name3373707'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Group(); + $expectedResponse = new DiskMigrationJob(); $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setDisplayName($displayName); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); - $completeOperation->setName('operations/createGroupTest'); + $completeOperation->setName('operations/createDiskMigrationJobTest'); $completeOperation->setDone(true); $completeOperation->setResponse($anyResponse); $operationsTransport->addResponse($completeOperation); // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $groupId = 'groupId506361563'; - $group = new Group(); - $request = (new CreateGroupRequest()) + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $diskMigrationJobId = 'diskMigrationJobId1115031760'; + $diskMigrationJob = new DiskMigrationJob(); + $diskMigrationJobTargetDetails = new DiskMigrationJobTargetDetails(); + $targetDetailsTargetProject = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + $diskMigrationJobTargetDetails->setTargetProject($targetDetailsTargetProject); + $targetDetailsTargetDisk = new ComputeEngineDisk(); + $targetDiskZone = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $targetDetailsTargetDisk->setZone($targetDiskZone); + $targetDiskDiskType = ComputeEngineDiskType::COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED; + $targetDetailsTargetDisk->setDiskType($targetDiskDiskType); + $diskMigrationJobTargetDetails->setTargetDisk($targetDetailsTargetDisk); + $diskMigrationJob->setTargetDetails($diskMigrationJobTargetDetails); + $request = (new CreateDiskMigrationJobRequest()) ->setParent($formattedParent) - ->setGroupId($groupId) - ->setGroup($group); - $response = $gapicClient->createGroup($request); + ->setDiskMigrationJobId($diskMigrationJobId) + ->setDiskMigrationJob($diskMigrationJob); + $response = $gapicClient->createDiskMigrationJob($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $apiRequests = $transport->popReceivedCalls(); @@ -1015,15 +1307,15 @@ public function createGroupTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateGroup', $actualApiFuncCall); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/CreateDiskMigrationJob', $actualApiFuncCall); $actualValue = $actualApiRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getGroupId(); - $this->assertProtobufEquals($groupId, $actualValue); - $actualValue = $actualApiRequestObject->getGroup(); - $this->assertProtobufEquals($group, $actualValue); + $actualValue = $actualApiRequestObject->getDiskMigrationJobId(); + $this->assertProtobufEquals($diskMigrationJobId, $actualValue); + $actualValue = $actualApiRequestObject->getDiskMigrationJob(); + $this->assertProtobufEquals($diskMigrationJob, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGroupTest'); + $expectedOperationsRequestObject->setName('operations/createDiskMigrationJobTest'); $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, ]); @@ -1042,7 +1334,7 @@ public function createGroupTest() } /** @test */ - public function createGroupExceptionTest() + public function createDiskMigrationJobExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -1059,7 +1351,7 @@ public function createGroupExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createGroupTest'); + $incompleteOperation->setName('operations/createDiskMigrationJobTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $status = new stdClass(); @@ -1076,18 +1368,28 @@ public function createGroupExceptionTest() ); $operationsTransport->addResponse(null, $status); // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $groupId = 'groupId506361563'; - $group = new Group(); - $request = (new CreateGroupRequest()) + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $diskMigrationJobId = 'diskMigrationJobId1115031760'; + $diskMigrationJob = new DiskMigrationJob(); + $diskMigrationJobTargetDetails = new DiskMigrationJobTargetDetails(); + $targetDetailsTargetProject = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + $diskMigrationJobTargetDetails->setTargetProject($targetDetailsTargetProject); + $targetDetailsTargetDisk = new ComputeEngineDisk(); + $targetDiskZone = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $targetDetailsTargetDisk->setZone($targetDiskZone); + $targetDiskDiskType = ComputeEngineDiskType::COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED; + $targetDetailsTargetDisk->setDiskType($targetDiskDiskType); + $diskMigrationJobTargetDetails->setTargetDisk($targetDetailsTargetDisk); + $diskMigrationJob->setTargetDetails($diskMigrationJobTargetDetails); + $request = (new CreateDiskMigrationJobRequest()) ->setParent($formattedParent) - ->setGroupId($groupId) - ->setGroup($group); - $response = $gapicClient->createGroup($request); + ->setDiskMigrationJobId($diskMigrationJobId) + ->setDiskMigrationJob($diskMigrationJob); + $response = $gapicClient->createDiskMigrationJob($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createGroupTest'); + $expectedOperationsRequestObject->setName('operations/createDiskMigrationJobTest'); try { $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, @@ -1106,7 +1408,289 @@ public function createGroupExceptionTest() } /** @test */ - public function createMigratingVmTest() + 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 createImageImportTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createImageImportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $cloudStorageUri = 'cloudStorageUri1921455774'; + $name = 'name3373707'; + $expectedResponse = new ImageImport(); + $expectedResponse->setCloudStorageUri($cloudStorageUri); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createImageImportTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $imageImportId = 'imageImportId-677769711'; + $imageImport = new ImageImport(); + $request = (new CreateImageImportRequest()) + ->setParent($formattedParent) + ->setImageImportId($imageImportId) + ->setImageImport($imageImport); + $response = $gapicClient->createImageImport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->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/CreateImageImport', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getImageImportId(); + $this->assertProtobufEquals($imageImportId, $actualValue); + $actualValue = $actualApiRequestObject->getImageImport(); + $this->assertProtobufEquals($imageImport, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createImageImportTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createImageImportExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createImageImportTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $imageImportId = 'imageImportId-677769711'; + $imageImport = new ImageImport(); + $request = (new CreateImageImportRequest()) + ->setParent($formattedParent) + ->setImageImportId($imageImportId) + ->setImageImport($imageImport); + $response = $gapicClient->createImageImport($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createImageImportTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->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([ @@ -1430,6 +2014,8 @@ public function createTargetProjectTest() $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); $targetProjectId = 'targetProjectId1255314287'; $targetProject = new TargetProject(); + $targetProjectProject = 'targetProjectProject2026784177'; + $targetProject->setProject($targetProjectProject); $request = (new CreateTargetProjectRequest()) ->setParent($formattedParent) ->setTargetProjectId($targetProjectId) @@ -1507,6 +2093,8 @@ public function createTargetProjectExceptionTest() $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); $targetProjectId = 'targetProjectId1255314287'; $targetProject = new TargetProject(); + $targetProjectProject = 'targetProjectProject2026784177'; + $targetProject->setProject($targetProjectProject); $request = (new CreateTargetProjectRequest()) ->setParent($formattedParent) ->setTargetProjectId($targetProjectId) @@ -1808,7 +2396,7 @@ public function deleteDatacenterConnectorExceptionTest() } /** @test */ - public function deleteGroupTest() + public function deleteDiskMigrationJobTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -1825,21 +2413,26 @@ public function deleteGroupTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGroupTest'); + $incompleteOperation->setName('operations/deleteDiskMigrationJobTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $expectedResponse = new GPBEmpty(); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteGroupTest'); + $completeOperation->setName('operations/deleteDiskMigrationJobTest'); $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); + $formattedName = $gapicClient->diskMigrationJobName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[DISK_MIGRATION_JOB]' + ); + $request = (new DeleteDiskMigrationJobRequest())->setName($formattedName); + $response = $gapicClient->deleteDiskMigrationJob($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $apiRequests = $transport->popReceivedCalls(); @@ -1848,11 +2441,11 @@ public function deleteGroupTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteGroup', $actualApiFuncCall); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteDiskMigrationJob', $actualApiFuncCall); $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGroupTest'); + $expectedOperationsRequestObject->setName('operations/deleteDiskMigrationJobTest'); $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, ]); @@ -1871,7 +2464,7 @@ public function deleteGroupTest() } /** @test */ - public function deleteGroupExceptionTest() + public function deleteDiskMigrationJobExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -1888,7 +2481,7 @@ public function deleteGroupExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteGroupTest'); + $incompleteOperation->setName('operations/deleteDiskMigrationJobTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $status = new stdClass(); @@ -1905,13 +2498,18 @@ public function deleteGroupExceptionTest() ); $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new DeleteGroupRequest())->setName($formattedName); - $response = $gapicClient->deleteGroup($request); + $formattedName = $gapicClient->diskMigrationJobName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[DISK_MIGRATION_JOB]' + ); + $request = (new DeleteDiskMigrationJobRequest())->setName($formattedName); + $response = $gapicClient->deleteDiskMigrationJob($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteGroupTest'); + $expectedOperationsRequestObject->setName('operations/deleteDiskMigrationJobTest'); try { $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, @@ -1930,7 +2528,7 @@ public function deleteGroupExceptionTest() } /** @test */ - public function deleteMigratingVmTest() + public function deleteGroupTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -1947,21 +2545,21 @@ public function deleteMigratingVmTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteMigratingVmTest'); + $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/deleteMigratingVmTest'); + $completeOperation->setName('operations/deleteGroupTest'); $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); + $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(); @@ -1970,11 +2568,11 @@ public function deleteMigratingVmTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteMigratingVm', $actualApiFuncCall); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteGroup', $actualApiFuncCall); $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteMigratingVmTest'); + $expectedOperationsRequestObject->setName('operations/deleteGroupTest'); $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, ]); @@ -1993,7 +2591,7 @@ public function deleteMigratingVmTest() } /** @test */ - public function deleteMigratingVmExceptionTest() + public function deleteGroupExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -2010,7 +2608,7 @@ public function deleteMigratingVmExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteMigratingVmTest'); + $incompleteOperation->setName('operations/deleteGroupTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $status = new stdClass(); @@ -2027,13 +2625,13 @@ public function deleteMigratingVmExceptionTest() ); $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new DeleteMigratingVmRequest())->setName($formattedName); - $response = $gapicClient->deleteMigratingVm($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/deleteMigratingVmTest'); + $expectedOperationsRequestObject->setName('operations/deleteGroupTest'); try { $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, @@ -2052,7 +2650,7 @@ public function deleteMigratingVmExceptionTest() } /** @test */ - public function deleteSourceTest() + public function deleteImageImportTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -2069,21 +2667,21 @@ public function deleteSourceTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSourceTest'); + $incompleteOperation->setName('operations/deleteImageImportTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $expectedResponse = new GPBEmpty(); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteSourceTest'); + $completeOperation->setName('operations/deleteImageImportTest'); $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); + $formattedName = $gapicClient->imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new DeleteImageImportRequest())->setName($formattedName); + $response = $gapicClient->deleteImageImport($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $apiRequests = $transport->popReceivedCalls(); @@ -2092,11 +2690,11 @@ public function deleteSourceTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteSource', $actualApiFuncCall); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteImageImport', $actualApiFuncCall); $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSourceTest'); + $expectedOperationsRequestObject->setName('operations/deleteImageImportTest'); $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, ]); @@ -2115,7 +2713,7 @@ public function deleteSourceTest() } /** @test */ - public function deleteSourceExceptionTest() + public function deleteImageImportExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -2132,7 +2730,7 @@ public function deleteSourceExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteSourceTest'); + $incompleteOperation->setName('operations/deleteImageImportTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $status = new stdClass(); @@ -2149,13 +2747,13 @@ public function deleteSourceExceptionTest() ); $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new DeleteSourceRequest())->setName($formattedName); - $response = $gapicClient->deleteSource($request); + $formattedName = $gapicClient->imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new DeleteImageImportRequest())->setName($formattedName); + $response = $gapicClient->deleteImageImport($request); $this->assertFalse($response->isDone()); $this->assertNull($response->getResult()); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSourceTest'); + $expectedOperationsRequestObject->setName('operations/deleteImageImportTest'); try { $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, @@ -2174,7 +2772,7 @@ public function deleteSourceExceptionTest() } /** @test */ - public function deleteTargetProjectTest() + public function deleteMigratingVmTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -2191,21 +2789,21 @@ public function deleteTargetProjectTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteTargetProjectTest'); + $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/deleteTargetProjectTest'); + $completeOperation->setName('operations/deleteMigratingVmTest'); $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); + $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(); @@ -2214,11 +2812,11 @@ public function deleteTargetProjectTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteTargetProject', $actualApiFuncCall); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteMigratingVm', $actualApiFuncCall); $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteTargetProjectTest'); + $expectedOperationsRequestObject->setName('operations/deleteMigratingVmTest'); $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, ]); @@ -2237,7 +2835,7 @@ public function deleteTargetProjectTest() } /** @test */ - public function deleteTargetProjectExceptionTest() + public function deleteMigratingVmExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -2254,7 +2852,7 @@ public function deleteTargetProjectExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteTargetProjectTest'); + $incompleteOperation->setName('operations/deleteMigratingVmTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $status = new stdClass(); @@ -2271,13 +2869,13 @@ public function deleteTargetProjectExceptionTest() ); $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); - $request = (new DeleteTargetProjectRequest())->setName($formattedName); - $response = $gapicClient->deleteTargetProject($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/deleteTargetProjectTest'); + $expectedOperationsRequestObject->setName('operations/deleteMigratingVmTest'); try { $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, @@ -2296,7 +2894,7 @@ public function deleteTargetProjectExceptionTest() } /** @test */ - public function deleteUtilizationReportTest() + public function deleteSourceTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -2313,26 +2911,21 @@ public function deleteUtilizationReportTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteUtilizationReportTest'); + $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/deleteUtilizationReportTest'); + $completeOperation->setName('operations/deleteSourceTest'); $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); + $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(); @@ -2341,11 +2934,11 @@ public function deleteUtilizationReportTest() $this->assertSame(0, count($operationsRequestsEmpty)); $actualApiFuncCall = $apiRequests[0]->getFuncCall(); $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteUtilizationReport', $actualApiFuncCall); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteSource', $actualApiFuncCall); $actualValue = $actualApiRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteUtilizationReportTest'); + $expectedOperationsRequestObject->setName('operations/deleteSourceTest'); $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, ]); @@ -2364,7 +2957,7 @@ public function deleteUtilizationReportTest() } /** @test */ - public function deleteUtilizationReportExceptionTest() + public function deleteSourceExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -2381,7 +2974,7 @@ public function deleteUtilizationReportExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteUtilizationReportTest'); + $incompleteOperation->setName('operations/deleteSourceTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $status = new stdClass(); @@ -2398,18 +2991,13 @@ public function deleteUtilizationReportExceptionTest() ); $operationsTransport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->utilizationReportName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[UTILIZATION_REPORT]' - ); - $request = (new DeleteUtilizationReportRequest())->setName($formattedName); - $response = $gapicClient->deleteUtilizationReport($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/deleteUtilizationReportTest'); + $expectedOperationsRequestObject->setName('operations/deleteSourceTest'); try { $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, @@ -2428,70 +3016,7 @@ public function deleteUtilizationReportExceptionTest() } /** @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() + public function deleteTargetProjectTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -2508,21 +3033,21 @@ public function finalizeMigrationTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/finalizeMigrationTest'); + $incompleteOperation->setName('operations/deleteTargetProjectTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); - $expectedResponse = new FinalizeMigrationResponse(); + $expectedResponse = new GPBEmpty(); $anyResponse = new Any(); $anyResponse->setValue($expectedResponse->serializeToString()); $completeOperation = new Operation(); - $completeOperation->setName('operations/finalizeMigrationTest'); + $completeOperation->setName('operations/deleteTargetProjectTest'); $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); + $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(); @@ -2531,11 +3056,11 @@ public function finalizeMigrationTest() $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); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/DeleteTargetProject', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/finalizeMigrationTest'); + $expectedOperationsRequestObject->setName('operations/deleteTargetProjectTest'); $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, ]); @@ -2554,7 +3079,7 @@ public function finalizeMigrationTest() } /** @test */ - public function finalizeMigrationExceptionTest() + public function deleteTargetProjectExceptionTest() { $operationsTransport = $this->createTransport(); $operationsClient = new OperationsClient([ @@ -2571,7 +3096,7 @@ public function finalizeMigrationExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); // Mock response $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/finalizeMigrationTest'); + $incompleteOperation->setName('operations/deleteTargetProjectTest'); $incompleteOperation->setDone(false); $transport->addResponse($incompleteOperation); $status = new stdClass(); @@ -2588,13 +3113,13 @@ public function finalizeMigrationExceptionTest() ); $operationsTransport->addResponse(null, $status); // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new FinalizeMigrationRequest())->setMigratingVm($formattedMigratingVm); - $response = $gapicClient->finalizeMigration($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/finalizeMigrationTest'); + $expectedOperationsRequestObject->setName('operations/deleteTargetProjectTest'); try { $response->pollUntilComplete([ 'initialPollDelayMillis' => 1, @@ -2613,24 +3138,538 @@ public function finalizeMigrationExceptionTest() } /** @test */ - public function getCloneJobTest() + 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 - $name2 = 'name2-1052831874'; - $expectedResponse = new CloneJob(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); + $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->cloneJobName( + $formattedName = $gapicClient->utilizationReportName( '[PROJECT]', '[LOCATION]', '[SOURCE]', - '[MIGRATING_VM]', + '[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 extendMigrationTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/extendMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ExtendMigrationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/extendMigrationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); + $request = (new ExtendMigrationRequest())->setMigratingVm($formattedMigratingVm); + $response = $gapicClient->extendMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->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/ExtendMigration', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getMigratingVm(); + $this->assertProtobufEquals($formattedMigratingVm, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/extendMigrationTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function extendMigrationExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/extendMigrationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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 ExtendMigrationRequest())->setMigratingVm($formattedMigratingVm); + $response = $gapicClient->extendMigration($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/extendMigrationTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->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 fetchStorageInventoryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $resourcesElement = new SourceStorageResource(); + $resources = [$resourcesElement]; + $expectedResponse = new FetchStorageInventoryResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setResources($resources); + $transport->addResponse($expectedResponse); + // Mock request + $formattedSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $type = StorageType::STORAGE_TYPE_UNSPECIFIED; + $request = (new FetchStorageInventoryRequest())->setSource($formattedSource)->setType($type); + $response = $gapicClient->fetchStorageInventory($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResources()[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/FetchStorageInventory', $actualFuncCall); + $actualValue = $actualRequestObject->getSource(); + $this->assertProtobufEquals($formattedSource, $actualValue); + $actualValue = $actualRequestObject->getType(); + $this->assertProtobufEquals($type, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function fetchStorageInventoryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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]'); + $type = StorageType::STORAGE_TYPE_UNSPECIFIED; + $request = (new FetchStorageInventoryRequest())->setSource($formattedSource)->setType($type); + try { + $gapicClient->fetchStorageInventory($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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); @@ -2771,7 +3810,238 @@ public function getCutoverJobExceptionTest() } /** @test */ - public function getDatacenterConnectorTest() + 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 getDiskMigrationJobTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new DiskMigrationJob(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->diskMigrationJobName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[DISK_MIGRATION_JOB]' + ); + $request = (new GetDiskMigrationJobRequest())->setName($formattedName); + $response = $gapicClient->getDiskMigrationJob($request); + $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/GetDiskMigrationJob', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDiskMigrationJobExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->diskMigrationJobName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[DISK_MIGRATION_JOB]' + ); + $request = (new GetDiskMigrationJobRequest())->setName($formattedName); + try { + $gapicClient->getDiskMigrationJob($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 getImageImportTest() { $transport = $this->createTransport(); $gapicClient = $this->createClient([ @@ -2779,44 +4049,29 @@ public function getDatacenterConnectorTest() ]); $this->assertTrue($transport->isExhausted()); // Mock response + $cloudStorageUri = 'cloudStorageUri1921455774'; $name2 = 'name2-1052831874'; - $registrationId = 'registrationId-412573087'; - $serviceAccount = 'serviceAccount-1948028253'; - $version = 'version351608024'; - $bucket = 'bucket-1378203158'; - $applianceInfrastructureVersion = 'applianceInfrastructureVersion662625550'; - $applianceSoftwareVersion = 'applianceSoftwareVersion-641402222'; - $expectedResponse = new DatacenterConnector(); + $expectedResponse = new ImageImport(); + $expectedResponse->setCloudStorageUri($cloudStorageUri); $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); + $formattedName = $gapicClient->imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new GetImageImportRequest())->setName($formattedName); + $response = $gapicClient->getImageImport($request); $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); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetImageImport', $actualFuncCall); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); } /** @test */ - public function getDatacenterConnectorExceptionTest() + public function getImageImportExceptionTest() { $transport = $this->createTransport(); $gapicClient = $this->createClient([ @@ -2837,15 +4092,10 @@ public function getDatacenterConnectorExceptionTest() ); $transport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->datacenterConnectorName( - '[PROJECT]', - '[LOCATION]', - '[SOURCE]', - '[DATACENTER_CONNECTOR]' - ); - $request = (new GetDatacenterConnectorRequest())->setName($formattedName); + $formattedName = $gapicClient->imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new GetImageImportRequest())->setName($formattedName); try { - $gapicClient->getDatacenterConnector($request); + $gapicClient->getImageImport($request); // If the $gapicClient method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { @@ -2858,7 +4108,7 @@ public function getDatacenterConnectorExceptionTest() } /** @test */ - public function getGroupTest() + public function getImageImportJobTest() { $transport = $this->createTransport(); $gapicClient = $this->createClient([ @@ -2866,31 +4116,29 @@ public function getGroupTest() ]); $this->assertTrue($transport->isExhausted()); // Mock response + $cloudStorageUri = 'cloudStorageUri1921455774'; $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Group(); + $expectedResponse = new ImageImportJob(); + $expectedResponse->setCloudStorageUri($cloudStorageUri); $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); + $formattedName = $gapicClient->imageImportJobName('[PROJECT]', '[LOCATION]', '[JOB]', '[RESULT]'); + $request = (new GetImageImportJobRequest())->setName($formattedName); + $response = $gapicClient->getImageImportJob($request); $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); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/GetImageImportJob', $actualFuncCall); $actualValue = $actualRequestObject->getName(); $this->assertProtobufEquals($formattedName, $actualValue); $this->assertTrue($transport->isExhausted()); } /** @test */ - public function getGroupExceptionTest() + public function getImageImportJobExceptionTest() { $transport = $this->createTransport(); $gapicClient = $this->createClient([ @@ -2911,10 +4159,10 @@ public function getGroupExceptionTest() ); $transport->addResponse(null, $status); // Mock request - $formattedName = $gapicClient->groupName('[PROJECT]', '[LOCATION]', '[GROUP]'); - $request = (new GetGroupRequest())->setName($formattedName); + $formattedName = $gapicClient->imageImportJobName('[PROJECT]', '[LOCATION]', '[JOB]', '[RESULT]'); + $request = (new GetImageImportJobRequest())->setName($formattedName); try { - $gapicClient->getGroup($request); + $gapicClient->getImageImportJob($request); // If the $gapicClient method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { @@ -3446,7 +4694,228 @@ public function listCutoverJobsExceptionTest() } /** @test */ - public function listDatacenterConnectorsTest() + 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 listDiskMigrationJobsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $diskMigrationJobsElement = new DiskMigrationJob(); + $diskMigrationJobs = [$diskMigrationJobsElement]; + $expectedResponse = new ListDiskMigrationJobsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDiskMigrationJobs($diskMigrationJobs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); + $request = (new ListDiskMigrationJobsRequest())->setParent($formattedParent); + $response = $gapicClient->listDiskMigrationJobs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDiskMigrationJobs()[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/ListDiskMigrationJobs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDiskMigrationJobsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = 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]'); + $request = (new ListDiskMigrationJobsRequest())->setParent($formattedParent); + try { + $gapicClient->listDiskMigrationJobs($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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 listImageImportJobsTest() { $transport = $this->createTransport(); $gapicClient = $this->createClient([ @@ -3455,35 +4924,32 @@ public function listDatacenterConnectorsTest() $this->assertTrue($transport->isExhausted()); // Mock response $nextPageToken = ''; - $datacenterConnectorsElement = new DatacenterConnector(); - $datacenterConnectors = [$datacenterConnectorsElement]; - $expectedResponse = new ListDatacenterConnectorsResponse(); + $imageImportJobsElement = new ImageImportJob(); + $imageImportJobs = [$imageImportJobsElement]; + $expectedResponse = new ListImageImportJobsResponse(); $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDatacenterConnectors($datacenterConnectors); + $expectedResponse->setImageImportJobs($imageImportJobs); $transport->addResponse($expectedResponse); // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListDatacenterConnectorsRequest())->setParent($formattedParent)->setPageToken($pageToken); - $response = $gapicClient->listDatacenterConnectors($request); + $formattedParent = $gapicClient->imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new ListImageImportJobsRequest())->setParent($formattedParent); + $response = $gapicClient->listImageImportJobs($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]); + $this->assertEquals($expectedResponse->getImageImportJobs()[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); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListImageImportJobs', $actualFuncCall); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); $this->assertTrue($transport->isExhausted()); } /** @test */ - public function listDatacenterConnectorsExceptionTest() + public function listImageImportJobsExceptionTest() { $transport = $this->createTransport(); $gapicClient = $this->createClient([ @@ -3504,11 +4970,10 @@ public function listDatacenterConnectorsExceptionTest() ); $transport->addResponse(null, $status); // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListDatacenterConnectorsRequest())->setParent($formattedParent)->setPageToken($pageToken); + $formattedParent = $gapicClient->imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); + $request = (new ListImageImportJobsRequest())->setParent($formattedParent); try { - $gapicClient->listDatacenterConnectors($request); + $gapicClient->listImageImportJobs($request); // If the $gapicClient method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { @@ -3521,7 +4986,7 @@ public function listDatacenterConnectorsExceptionTest() } /** @test */ - public function listGroupsTest() + public function listImageImportsTest() { $transport = $this->createTransport(); $gapicClient = $this->createClient([ @@ -3530,35 +4995,32 @@ public function listGroupsTest() $this->assertTrue($transport->isExhausted()); // Mock response $nextPageToken = ''; - $groupsElement = new Group(); - $groups = [$groupsElement]; - $expectedResponse = new ListGroupsResponse(); + $imageImportsElement = new ImageImport(); + $imageImports = [$imageImportsElement]; + $expectedResponse = new ListImageImportsResponse(); $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setGroups($groups); + $expectedResponse->setImageImports($imageImports); $transport->addResponse($expectedResponse); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListGroupsRequest())->setParent($formattedParent)->setPageToken($pageToken); - $response = $gapicClient->listGroups($request); + $request = (new ListImageImportsRequest())->setParent($formattedParent); + $response = $gapicClient->listImageImports($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]); + $this->assertEquals($expectedResponse->getImageImports()[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); + $this->assertSame('/google.cloud.vmmigration.v1.VmMigration/ListImageImports', $actualFuncCall); $actualValue = $actualRequestObject->getParent(); $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getPageToken(); - $this->assertProtobufEquals($pageToken, $actualValue); $this->assertTrue($transport->isExhausted()); } /** @test */ - public function listGroupsExceptionTest() + public function listImageImportsExceptionTest() { $transport = $this->createTransport(); $gapicClient = $this->createClient([ @@ -3580,10 +5042,9 @@ public function listGroupsExceptionTest() $transport->addResponse(null, $status); // Mock request $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $pageToken = 'pageToken1630607433'; - $request = (new ListGroupsRequest())->setParent($formattedParent)->setPageToken($pageToken); + $request = (new ListImageImportsRequest())->setParent($formattedParent); try { - $gapicClient->listGroups($request); + $gapicClient->listImageImports($request); // If the $gapicClient method call did not throw, fail the test $this->fail('Expected an ApiException, but no exception was thrown.'); } catch (ApiException $ex) { @@ -4336,6 +5797,138 @@ public function resumeMigrationExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } + /** @test */ + public function runDiskMigrationJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/runDiskMigrationJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new RunDiskMigrationJobResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/runDiskMigrationJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->diskMigrationJobName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[DISK_MIGRATION_JOB]' + ); + $request = (new RunDiskMigrationJobRequest())->setName($formattedName); + $response = $gapicClient->runDiskMigrationJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->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/RunDiskMigrationJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runDiskMigrationJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function runDiskMigrationJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/runDiskMigrationJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal 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->diskMigrationJobName( + '[PROJECT]', + '[LOCATION]', + '[SOURCE]', + '[DISK_MIGRATION_JOB]' + ); + $request = (new RunDiskMigrationJobRequest())->setName($formattedName); + $response = $gapicClient->runDiskMigrationJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/runDiskMigrationJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->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() { @@ -4458,6 +6051,150 @@ public function startMigrationExceptionTest() $this->assertTrue($operationsTransport->isExhausted()); } + /** @test */ + public function updateDiskMigrationJobTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateDiskMigrationJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new DiskMigrationJob(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateDiskMigrationJobTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $diskMigrationJob = new DiskMigrationJob(); + $diskMigrationJobTargetDetails = new DiskMigrationJobTargetDetails(); + $targetDetailsTargetProject = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + $diskMigrationJobTargetDetails->setTargetProject($targetDetailsTargetProject); + $targetDetailsTargetDisk = new ComputeEngineDisk(); + $targetDiskZone = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $targetDetailsTargetDisk->setZone($targetDiskZone); + $targetDiskDiskType = ComputeEngineDiskType::COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED; + $targetDetailsTargetDisk->setDiskType($targetDiskDiskType); + $diskMigrationJobTargetDetails->setTargetDisk($targetDetailsTargetDisk); + $diskMigrationJob->setTargetDetails($diskMigrationJobTargetDetails); + $request = (new UpdateDiskMigrationJobRequest())->setDiskMigrationJob($diskMigrationJob); + $response = $gapicClient->updateDiskMigrationJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->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/UpdateDiskMigrationJob', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getDiskMigrationJob(); + $this->assertProtobufEquals($diskMigrationJob, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDiskMigrationJobTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateDiskMigrationJobExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateDiskMigrationJobTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode( + [ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], + JSON_PRETTY_PRINT + ); + $operationsTransport->addResponse(null, $status); + // Mock request + $diskMigrationJob = new DiskMigrationJob(); + $diskMigrationJobTargetDetails = new DiskMigrationJobTargetDetails(); + $targetDetailsTargetProject = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); + $diskMigrationJobTargetDetails->setTargetProject($targetDetailsTargetProject); + $targetDetailsTargetDisk = new ComputeEngineDisk(); + $targetDiskZone = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $targetDetailsTargetDisk->setZone($targetDiskZone); + $targetDiskDiskType = ComputeEngineDiskType::COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED; + $targetDetailsTargetDisk->setDiskType($targetDiskDiskType); + $diskMigrationJobTargetDetails->setTargetDisk($targetDetailsTargetDisk); + $diskMigrationJob->setTargetDetails($diskMigrationJobTargetDetails); + $request = (new UpdateDiskMigrationJobRequest())->setDiskMigrationJob($diskMigrationJob); + $response = $gapicClient->updateDiskMigrationJob($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDiskMigrationJobTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->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() { @@ -4881,6 +6618,8 @@ public function updateTargetProjectTest() $operationsTransport->addResponse($completeOperation); // Mock request $targetProject = new TargetProject(); + $targetProjectProject = 'targetProjectProject2026784177'; + $targetProject->setProject($targetProjectProject); $request = (new UpdateTargetProjectRequest())->setTargetProject($targetProject); $response = $gapicClient->updateTargetProject($request); $this->assertFalse($response->isDone()); @@ -4949,6 +6688,8 @@ public function updateTargetProjectExceptionTest() $operationsTransport->addResponse(null, $status); // Mock request $targetProject = new TargetProject(); + $targetProjectProject = 'targetProjectProject2026784177'; + $targetProject->setProject($targetProjectProject); $request = (new UpdateTargetProjectRequest())->setTargetProject($targetProject); $response = $gapicClient->updateTargetProject($request); $this->assertFalse($response->isDone()); 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 661d359c144b21ee7f505b79d59513ff6deda99e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 62065 zcmdsgdvIh|de^pIBOT3XG-p`8t%HgB z{rp6wTCSIK<-Lim#?DT@I*}_ED}}v$b#h{2eq~~LWn&^WpWb*9U2Ek=HJ6{6*e#cL z_wrM@y>erFYQI=4>|($|xiqzZ&HU%299f7`wwSL~vbp@kjn&zud_B9Jt!MAukb~Tt zqe1R%`h(oty!N^fxxH+yHeviMzFAD*f0f48ULiM8t7F34#M6aZrcf%>3)#KG7XZ;4 z6Fb?xS|0tI+wL?oMeojqG!xeTWF7p~^W||iH#zei^$eXiIOjPsrMz!?1 zTsIBy(EICN#HJ-Hg?q_TsZ6_2F4bmce3<+pT6LV;E96V{&iX7A@_XB}`TN=ZLb=*S z*K}#8+*!A^yu!A&VOuPhcB_q2sZiRzw^AV-?`&_pBcE?@-}V>mb;Vhwik1377hUBR zFJ)^Fy6C%60EN}F#Y+2q*DAStscN-cod-b{_By~J>bVZgYqaPiN$G`86cphkx3@hy zSpZ+T>|r+H`Lp8p-tQGJbi`4di`;xtGN4I=0Zr~-8$Ykc%2o>CP=xBthsK{UKI{-a zXSNhVs|IS=DeB1$3P4-+@q*F2s&G?%dP;rT^AT{W>>;3P^tfsyc_J9g)V9L1(B$6t zJmHc0s5!3pk(XBlwx|{wIIl%rqeN)_Y9%+7r*qG2^TDg{dfVtbajr&PS8;~IX`e?FYz>i|FT9}lOL*iqWuEaF%1Uzz>l!>MWrVbQ?& zDI>AbZCz4LhV7VX(m_B^oAA10yE9iFiq2aT8!-%!MgGpCSg#j zzJ$gelT%Dvr`VL8*QFA&SyXb1>=lMF;FSvsy-MSl&gE*y1Mn;{rq-gFTX0gfGUP_)jX~u#@Qh`f{n)Ib%b7x3N$*^ zi|&5wJ+CjZA&*4lr8zv^CNE?f<59e8_dI4DnVz&lYfu;8xID&7QcTgyKiA&!m&B=D zqgsXRkdZ`Af}#|LhNtb9vB&GmC3*Ak8rH-)xf`0p;XwJ08k>;o>1NDVMgMNK+^CG5 z#1KQXmmxZQm~@>9%jJB7+C#n=*voF^_iAIKQo4A#?Ok1z-BP7`^}tDqQ`I~PR~ZN; z;9j3AZ`H<5$pN3S4md~6KULo1o$-XC({dwP3PovgT2I%gm%;sc!ZUKhd(YZu#H{7ZbMpTC}`_2TPxc55#$xym3<{el=a&v#h# zKFA-)%XtWLVE=x0uaRelHPiE2!u|J&cmZ=YwLH%P=8))LOC{&;LcSakVj;b@zL8nK zyF3RO6Y^$qZX>;!8trpN#qqh@8yo18S=mgjjUFR06~D-T406}yq%D+OCis#-HCqu~TEQrTpGAIx4m$w#Szu7-Uj2NHXJ%#0cR2VYFtEvDQb)zMM-D zmP9g$DoM)YpsYx>t62yFN@7%imvRPp}nn!B>(eA#}NF`gZQzbeCCPtdR@ z?R-8@?F;eLenUiy;ICf>fBlh!c*e$GeF7;x8V>7CKs=WJVd1hr(kF%$p3r7G>tY-{ z60WaC%`^%s6^%`UovCOLV%`?#Yxf&<$s)JQ@0EPhh2p*+vmW-k>N}6F%D|vmGDg{AXQj=X1$9tlwI=^j`^V7>$JEIZRBt%6uy$UfwEyvCGX^tT3D}jpuN3oMr60JU z)Ejwk3-t~j;=I1QUkoryfrL50CR=$a4Nt#lT2R+(qP=&p-iSZ0-1%g%>9JFMUP zP0=q6u*$j?W5@N)t^NpFVqn_SHcQjeN!#3p%`#-^WWFD(NPW^Xr}ascutUK6K51H7 zLWW*q!9(ySiF_$nJ%I2J<1b5%F=nom*M4>Y2>#V%|9EFMote*mkbGA>X}QQ1*1Xp3 zB|ZzeyC&`X+A-kXgvHBSxHBV;Jt)>Pp5JBk8r%4$5Y%%x&e0x~Z{-i% z??{N#5f}=i(jYv@i1ATg>LDWi3c`=x1O2l_i%77K_~kxXG{F-J6=iV8Z}t1|dRL%7 z)tP-jE<8&S0(<+U^QaE@;elf|;{L*b7!4!3^BFOk&5=uwV9NkGw`6YT| zl5h&8eXOipJ%FcaH?xNe0PKa>rCqRSntda?3$OX({%~;eHL3-8^rYomdP{1E2mq^e z>f#bBqGa{d0UWgqojk3g28Ri)V5zg+W^E5cuBnia+HDMob=6YR3Qkv%j94R#Aw7WQ z`tgD|6LnC)yb}f*;8vDQ%Xu6|y*!Yjp7Fn$m`N%Gxq|^(=yK~De_r&`K8+goS~@Vg z{!OE;{B1lbo`?e}&hR_eiQU%^CXhBAW$5jlbzp+`@i$XHsN~&W>KBgTPg4xu*%7BX z%!gdOv_;gB;x`BjZ`hBs>AINY;J9@;(wx5nP!O)?T4Rf20BNK3;n2qQI~TOEn;&_#1Fb@*}EMpdwJACVOf?t=>;*7 ztsumWG#>;M?^NOPt2S~7$<1dpoHEpnuey8BigCYvt-Mp0Q4P8!Nn?!e&a!Z_`v|Wj znO%=mlOEYPM{!bjyDgpTD)#G!7->`xZM_ZcMh5A@M@x`hv2N{c?n0Nf3LSBCrc42J;>3xmk#qMq)Ibz*vl?e*7LQ1}#~0(1OizU=~cK$S2SGq)|*#p}P=& zh=CZs7Un(orxTD!L-^*bh_O=sJ;>pez4C#?Uk~M_R1%B8nxHnBQNZJPvQWw(j0H5t z5hIeNcRG&yE*2Xe+u%ohnvhZ;3935-5wf2!|AW)@3}4#K#d?W7=?(;^DNR4n0zP#CJif2`pDxBR(#Uu_mQW5l>lJ1VhX0 zty@C`;wE5-;E}W$;?;oJ$kWzhbx8Mb11<<)u!{!=Jlr|(me4IHr3oqYIUNLAuODEc5vZSUYrz#Z7ULLrh6|9z*rVv@7*p--uCV;#1CM6cssj2A5tg{ zZ|Ut$UtflB5}Yss`(v=m-prA4Z8oaUz}u( z-U|nmp(sUPf<#Z_M$qRDh3cH~b8{RW;@cYyw3aM^;@jaC^#kx&23i!umGXN~AL%B} zOF3v{+U~gvEp~F1`qQHB;a%kz%2T& z$nMNKHpTI5HFv*Ihj0twNgAd`reC+Rp75q@7L&#ha$Gkpgt1o_#rf5hJE^ryRN(r6 z=vi4t%=$6W3!w!9iwsgnX!|k+srS0qh45Dmz3u$$%F0G&1rY%&%b^%}43Sz$W2`~Z zH=ABrAMJ7X#7J;`&J*I|=29lPHg_|UYM4qkb~cfU$cyh{uH7Bh&VvKXXk6 z5;G2v(&k|@X$K)pX5>9hCDKD_t}L; zH3^%|sUD(Gd}lw5RYN{(ah9gdBV!5_^QVIm`wqz=-WF#fx9_9E1(|QA*EVib)L~Nc zn~l4xVRiwgb8~YEd;yV4tI4&b>H%)B)j970<4V8u+AA0hsv2<}Vk;Ev$Q-7ZT>1QS zW+^#0+UH(n+jIa;h3En5vs|qcza*z||HTmEWXOotl0)4JG8gI=X9x%mXs{QlvlZE` z$80UYYKWVKSPk*A@TJKdsnw-P%&8aNm1D$eaMP+d`e{4u1h!yuWqlq!9VnDEf=(r~ zyUs#D%K_esWO&2VAMbE6{>AU$ILs@bd8OSh6Iz+UE$0;bIxg8)8&*vZOD26H2g_Bl zoK?3U?Vm4$`8JV8x1oGfLJ^nEkkC6$5x@oCW~4?`n9 zcQTq0O80|-^zJp-vC==jBu-!|W7~r>0&AsHpmrY~XTGu#KwYNfd$wj$dL^XI5{sXm zF-7>N+ZL6Mi$O?GYZMC!4gnshtpz<;0Y0s)uF|Jo`Xv7a0ZIm8&!>`$iz{>BVffrn zoXYzJO$Mm_?d4m`D|ePhj~$Yoer*M=x5TIxM{C-_@P;_H&8f2Bf#f5yX94K`s=Iqj zoRGJmHy(VL!SSB6W3?gw!PkFM(W5uq_3&^p0iXe1<^DvEI2Tselm!7U=6z1r+Anez zUYw~$gRa*GuL(9U3%?_cz-BSKr82Nn=$;fqSz53hfVg?w?uT{-pB+YKt4cJh zxxd;Y9+R82&f3*csW~A zsZTgWM(Vlp1F{^4jR~N0j)5VpC2yoM5h4uai~02Wt#vRJQofdxtLrycHb{N?y9sfr z1r!SFQesFukhJB>e);k-sl{nGYWJ_?~1Ig*O*KrHVzSFKl z8$A`jxcQOUQ{rR@9QV%-h*P)g1ufPii>zF&L($_be72|H0DGHE6@0zi)Q%W}CQi9) zny0lJhA^j%z!}dC!xY@oG9JpZAW5x_(UDj8_h1+}O!?5?CIJAXN*w8r?FUOzi$>4{46Z_Ni9ng(ZVZ zG5dM1U%fot zL`18=aOB_Yb-%kuTp}-ru{(@ho__{es{#Ma%Q7%*(&-FUQ=)Ibkbh5}=*YDF;%QpT zCVKKU8n|8wWn@Y~_2=@=MGmMIssTM*UPfg}@8iDb& zI3KmcAt&j&I1|-MX?0y4Lo`x;QA{vWT0lRNT_yu`*oEo-@q{?9f;+q*1AVp|Ew+Hg z?=H_eaurB3XHGX6d0U2ZKiDgJOs zT%3!__2x`=W$iV>vQuJ2WyC6hl8tAxFMOE1A}(7*(hXVoW|a#~k#SABOjwkI3{^x@ zg)FcG)fqvg)dGqR$>ozaWq#zCPWsi8S}1aO09K(PNSluSRhGWnL7WQ*AIF(ZmRV3r zQ)D^ylA)%dusc#hWK3BCl{JQ>^d)VWBnZX{DuGR&hpH*vIU8PH0_!I8R?|aZ4Bk&& zNGOo3a7!FV`56?KP!2Sj6n0W>590cC92{jZ z$CX5&T|vC9>cR}{3E@Z@f&z)fXEVeQYGY$W$g)9)nK9#2;zV$R;(V7sJ0!*fXQydO z=J_}CJ~$i#Oz#_ji$w$vOD=X)3~W8bz~(x~ZMoTxj(^P`1^+@6^)~?P3I$;tf^|7} znz)wTD&CrmCWAEDA=7#@kYd*<(~{=&|DQP4uOdjeNm4l@jwzvs;{%wxLOevOjQ$`^ z(EI_Hq?C>5($Fb%-WMu6MU}Sciy=M26Rbu;Svq(~$v_g9LlZy=wdf6WmUFp(K7pu( zfQ*3LUEd`f7yBLTIw>U;s1gVm&_arY*qsr5^4l3P8sQ^>O?7z%0rfJtY&CiJ2HRO@ z@2)H&NbT<@#5rH$ST1kplRL=iM`{~+n!WT##N-TerQtGrl1HZP)jXodoaA!Z$VQ<^ zCo1Gc-a6cc?rUPu`!*)dtgNQilJNV4jK&DLOH;@lVoXpjK7+q|+~4dKr_?d{lREE; z(@32n=>WDsLIvdeOp#kgXR8faSN zBy0~fggm@Oak7Nn&t!S~Nj0FI8ICFO>#s6!b_jMrg;Io^V?Kkbmp`xF_C)TwjMZk`pVZ(BB ziBa|p*+bOi1YQDK#B?YFdRI6w)Z_Se%~GlCNwSBb21nm4YJrTkQ4HOzezM}o+0@VJc!+2>lNps`yfu$3jxJYx>PrTAdS;K z`)sWNbdN#29BmGGnCnM7TArGJ>o^1(}+v8sJdLtfgj zIATMybz~RaFJk9C*AZip-PDDkBd??K=*mlH{8e!_dc^^L9#Kefin7+51|@xS8zpHF zsOnot_*hhwV9 zHeDAy9gf4a36P?rl=_fifc#nQ83rh7SGD}CAriB-#!fQ!lMRZ+ynY<3Nu6wjp%Mh% z0l~lRY4u);Xu`oQqszsfkcVYYxsF+xLCU-?poP@=w}~@(rLVc(g&i$O?Wfs1rYVU# z$R9{e8J_NpKXk0?cW6s+|ENcdh8GXXrXRIBQ5=k@X?XgRR*o6&JxTkJrtW$(a1{sG zy%#}}fVydz7m2L9V)q_Zm`uu$>VxOd4WAxg5vQ8qLV*xnL7TUW0ef2dVICKccs1uYZD(;EavJIPP-i0@S7^p97$ls;RIXrDImQL&TIj{Ve=Ff5v9M2sJ zUI>rPH;`SP4UX+|bv-Z&cFJ|DU`D$sHF)<1WsOgWk>F=D%LD)hL<}+t(zG(sQeGCW z3rA1PKDaN7OTjiFc*t>%ZKCW=4~2W(&xjEvfa}ucFCwvH8!6b{Ga=M^c)E3QTM5g9 zLIrg-GqT2}Os9|zhe7vWCd3%K=hW><75lZ9=o2Bg+@!?4%TBw+f^l&b`Na+{$O$*D zce(Z;GX1#uRj~tmT|i@zM3&KRw?Ba6i`+^^V=uPiupm83Hxk0^Ib?%qVw)-8+r^x~0%=n+gD9$roS8F3EQghugE&3r+eZyH}s z{aG=#Km{$4nDL0f25>1^_5Kl!58#@{SHN8q7b1XDAAcToD_Ann-s{Mi-=J@ZnS7{h zoFs^FwHXq~+K8|Xh0wFK)||Rd5vH)56}h_i%>D<-S_f|V8_K_h5Kr}2i-({!M$tp&Ct!S#&_Be zO?Z?SrTgOvF&?#eMm6WAI2qhYeb?DDHUe8gnAiPnhbJS(S*!{Sst@n*+l%54E(amnmk+T4W3!*=B?oQ9l zyB{Rq5%KQ@z0xk@mPHxCu;u?hB!W0a{7CMB$3#(#B@oArcZ*Ofxt({59x3xg@laV6 zNH10~%~!<$L#4E7*J_uMoe#$&;ZerrCI`}d@s+@(ruHlT+}xiBNX%{n!*zcEun@}4 z2yxX{^g~okdu?t}G!w-`9S$?mz?wT|p5B_6i*&gr=9PKjFs}?OsmoJo%^RT$j=_T< zC-Inq#sTlKFIG3&Mgk;Q2JH#7A1F}%Ve)dj%A^YcHey{$fc-JV|F5Bl&3^vtZ{e^9 zMlVgR{hz@k!UW)jKL3#dC4|ISsr@Cg z_#X^zW)Wl)@NjW=?>z(!&+7puqM>Q?)dm;w%FP3-UHn@JWgs^1FVN%lhuy?S%JILX z3}S(GE4Dw2n*9C&X+gQ86Y5?}MkGG20DoCWbA*4a2SErG^=i6~n+ofTY&DIQp3HZz z+7#1Z$7Ru5V!QMS_ELT;qBghuXrNxIvkMgyWh}kdQlu2dm+DjET$Rl*h#1aEOy6U> zEy-fimqriC4#V!Ri*d?)QJ&8Iy*@GGaaQ>@I+UWm9D+5ZaXBvNDA;vU4lsw#ytdcG z34V54zw*Kx^OzPG=#}TiGAb0p$g#b|FTrrnSFqq5McQUiR;#GEK^y&0XYzi2uY#zg zk{4}o)|~DpzD_RUE6;-ptGq(Wrd4i?xTALe9v-CfAcfKVoP0$uGq*Ay4pljY3Y=UM zBEv83C8+q;`pWG!M73<9B+fjS#Nm%UGR2%fuBBEN(^PB%(k_1`;u%wdZ}ZnaT%xB} z)-&>*FSDDhR57=Ruq!pr08s3NdOuM8bc}|+y^;1x^kDpzwGH)kkk*`B#dW8#UQYth1MU33r}UgAnGy z8+HrQfwUMi15I~<9D2dd#{!u?Vo%C1E{ zDD13>!JR@?eo}OA4;+ddWpY6c!L)@OE4Us*HTsN4thv?O+BL@^X7-GX=xO;^@|hXY zC%uRhJOejbE?dcNp@;zDC~H*axU8t$?gQK`&Kdo9r3<0*Jgn=+jboPolH-iS%h|MI z8QK!|AM&&aNzv7L2#o!#pXXz~A@u0b!b+ zgGRte7%A)}2AYTH3M1Bn7-5f(id)v}Fp8*9Ix~z8Gx}zg50M0NF!!%bMh(&xLTm;RBIa?Bh^6yV zzJZWpRPLRzU<+E{__v93m_G9(M~Z)t5RZ{Ug8~GUJ4BM1e9GHXYvw|_;Y(6Ce8G9% zlA;(MELfq3m|bKE0cn9CE@+kzkjftY*fRCQ13lNlsgSab|8zm*r+(B*+q0e0Z z${u$WhJ<-^xAg-uVjRj&cucMGpn#^~&r$m-Ch!J5J$mHT z{PhZ+)0X!mhUhb5oXLSgzqD=I3!)=5iHl<=vXgVNW!jJ_`VkSmjYmdQ?yQWqYMO!r zD(xolB_5&mEb*=YHY~<%AOyQH^+r6ewjlSBAByKdQ@a2om&lv%y%isfV!Ysy@Ym{iVypqc zBMdkK`TVCpfP8odI12eVNRCg;Uh%dy?)3uqa^kTTxW_Y4;_-0IlOtBtqe&uA4?e`4 zEK9%bzaj++R$;Qe$P(x$14UjMEk}t>D?wE!b#>H5oKn>eJTjIP;r>#uIB6_WzHEzxDatCtBXNZpt-|)s5H(_=s>ZRq$ zt&?T@V`KhR7hV{zhTkKiL^Ha=ADLlvc0lwIz3@BZ{z-*4o<3W4&&6Z%(vtzWJs{j4 z?ic5xnXI!b#sYz_c$Ac?;~_y)KTBv=MUCaH)Z{5hIeFC^MT)05kURVk1J_P0NI8YC zWmW0Ho^3-VVmt_#VD!MqLFM5L0a41yKmkP>Y6W46$PM#jm$Bu@Dx zgpqjlju@-mFXZ>O;neb8r(i-+Owuk#udB}K5(HCZTcZ{VXpA9^&bs47E<1)tX5AeX z{b!KC5jYn-hSZ-&#`vDRX@~r`g9_QAGQ4@oJfWWOEY@=63Q*0H(i86QQ+|EqzCeHp zWb)C?9`|-e^hlHPv5!0@WASE(G66~LSJW0$B8Zq8w{-EyxIe6Pprz*M$r<^GO;ah? zjkVhp>4j3R3(3WGN(#S@2VM=v8bM8Xk0zME$sr|VPI7-EA)buA+9`x(H(!D)nS7b@ zz!aE}HdToPPS2+ui1Vrj(y$i&;!qyZZ()C_E}*LKBSqLQN&>lO`F&3B%4KoF#Y?nd zX71jWSsBJgXnWN4fIX_6pnqc!dh$%B;26JoHpOmIaEx&}H76#FiloNPfe0_WiH#?( zwhjz&$IGBGCd9&(B@r1k1w*dWMnrpdhcOZzboap$|JF;@GKSR0b=XaXQPTu1V0M-B14q9CN192 zcc3r3zpSFugTs6HpA6a5)eKGt8hMA&LYkjqKt|O4tiu~h=982@p%*6U&hP##9uwj5E)7~#Q7|W=hx(G3&9%tY#8sR zhCUpDCO*O%KS*5Uj;H%=s~0_3U$8sx!b=W_aC9O);W#NacEsA=y2`6TbcnJrl2kqt zQ-~(KcGJe#zUdD&OUMYJ?SA%xiGeA}b|aD2t;Cq^Af%v_{XD&h2MeBliKdsI@6%Q7 z;|z6%P4C#uFT!Z|HxpKOP++ZujXI48MmJ?1Xpx1)_=;xy$HS@Z5MtvK{gf$s$pN1u z8~mxJcGIKbpJpM8M9_o#rCv^lHt8pTjBs5I*H!Hs%&i`;vL9DKz?w%diP3B;Q)3<0 zQ1WR{TcT2_!_)REl(dGH5H{OBf>sOmIK@O_rb@Z$f%j@`l66Pi z$HaJRklg={#Fi$iqR^CW08K)ouTkN-5u-qsuh#17PPMRdOCh4p~wr?uU50!V5nlB-Md3fj}J(?jCyEfFrpIThjijLb={D zi;oa_#6A|NL$!=aWl28rz$fU=e@j_ZxYU%L*rGu2->TC?cJ?6KXRT!b5rKANbsBe` z{Np7Q0mL8am1}r(P5v>B2iNe&`o=Z9vqpc+T^k+X*V&TG^U1Y&Jg|mp@s}i<$kQg6 ztW!&N-9)5>$D&sTwh4g)7g|W?fjz0YjpB25ds28hmaCo!lxS!5XBY?jTi^R@zdqPA zm~eG4PPn_LI2;M+k5qL)H4zz%69Ix!9#+KZ=3Ui_bm!aJi`2i9C6wEQSBK(4$`A4- zPB&vdci4(!XpY$ZY zaNXW}>x6I#1jQc9Do`Y9$<+o5wrRiFhMLsW!r{`9dR&Q@0l7IO|8tDNtT0f#{ zD>83ewnS-7=Ew>7;~s0>Y<(VF-Zs!|a*?tN@L0JsC7y3N&`rD@ye1dwb?Cc-=Rd~+ zKpG}fdT;5e&~QksNG-3cSN!Hv3(4Dy8>1g_o)#0fhO%C5BCeIJW!rP*Pf{A4Styh& z;{0g5b47eKG*9c-*j=1(@RZE9{7^fJrdrzY8}3(rG9iwe!FqV^>H^Y5=8~()S>%0e z+zl03#aRVEFK^=AH2wZz61wR+J$3k;cqZ8F#^y3=sV=8B?yRicLRDN;YF$Vo^}5Fa z!UdbA=T{dZTJ~O96eF}<@YyK)Hl=M#xaU@uH&bit&9Bz`m4)#xD}kKZSjo`#^jv}A zy6LGOD(WLKBO>W#Go88<+6<`av&r@J900~d3%3^+F>XAt3K!e04eh@zC|i|R=`&x?D{h7eAl_eMGuu9JL0oDF<6 zI0n_(Rfr-xuCAq)(zlmJd!~Pb@jY(fl^rIB@)nloh$JU3dZi*ei@QW5B& z`1keqlPW3y+yC`%|LGn?GEePagMlPlMS0XWly#ssb!Ey^I;O5XoT^EUwdQ;|A%Qsb1qHy~e$A zX}8)ak&3KJYC}_VYhOuT6a#AX<{ZoSljnIOuh!&-ssDpuEy4Mi+sS6n4DcWh{2s?y zK57drvuT@PHR8Zh<%X{|DtI`G-Vm%kkPuy;o|fptE1hiboIJq(DF9=EsV%_FrfmYY z`<3Jsadx*{MzqW%kh@;qYV1s=iWL-Jk2*dB^{(()wFi;|P)34pFFW=Z2ZN0@ICk%U zxQ`;~C6F{9fIO2=IML(kbVY}z$sGIs zGv9COr6G&C0)8>^mE=bwUvO?pxqm-7rLKd9e1$%sJ@kpsM7&Dr{0|84 z%tM=CkJ+&nz1rNdFLup@XRq*190pJRE3_!0xQHhRYmWVejaJ<>-1fr2t$Qm%Uk?)c zyffPwq2nsX3v*N|9V$f$_43NqnuD;ObD-M@Xk$29bSDj}U6P8J%>^6tZ&M9hdj}Z> z7?C^*6kJfo(Pq#c`)Rc7ry-0X`+o?szszApp*@cjBwkX4?}OsMcX~DIM@{_ixJQ5m zGm-CmIxsF@U{a1au$cX8*{{w0`t+;M7X)$1^ebT_fj{&t>6uC-8lqs&fkFw0w!)i6QhCz8*5PPL2bt9 zZrbGVdhP8|sd*~I*}oGg$$G0XK@3VZwbu~DaPlv=hmvF78Z-OFCdK#8^bLuJW~27h z-zl#PFp@|#h?M^c4rk`I?e9cW`!;uCziXa+{R(4hcc=YFz|?ib9cWyI3*4?O2OGBu z9kHJ0Th-o<&IML4Vf{oh*ni$?CG3ZSZW#GJ|1T6@> zr94G0U-kadBG$UQAdjD0cFgUjGxdYMxtQ)tv1K-D#ADqa` zUWnQcUqxMWmn7KTTxmYcbfM?u(&^lPEg?>j@TbA3IraePKwAy79aBPGlwf%$C|KTf zj_61og!T_ZZqxw9c&v<;8k%RUDwiJDy=}^tdijSw8t40<1uEL|%BIGM{Nd&rkQgcR zF9H=2Fyfc?jAXt~YI5`|kX|*ak!q5>h|^oEl(&8I{B=lSl79RKF}G2uwT9hpM`-G#h!lPe(-r$E z=g1D(`A1+pM0_4#F^nhBRznpNdF>DGg5CIxRKw97wR$V2vvN>ZUeNZ*g3~p}?sV`Q zY6#-}={&H;LihFHkz94I#M9lwsoiS1QK>mUk`RN~NI9fqFNUI<>4mmYwA}r;xygEE zwoT?`(Kh~baBb#eyg2*57%lbsVwhd&E6H*1wTB2d$XUhao@iUDbayx||8eo>-}{A#rZ$QF_tDTw|tAYwJX9f*vUZ9=ru zwW@#h3Lj8=nD*abzG$i-AEWLxwQm!qZ^M-Wbtj^GOELfbB=5IWb7$Q*{NrjR=lUmw zsvPoc0+KyU>Sv+~&&POHqq?*S^>+g5YxZjQk)nnHcuF}KC2aA4S0ifvlXUwP^^OK- zfgp*3-fXHl_7ZW#q=Owa-1fASsDA1moeMJUmmQ8tvFa}mr(l!W^`D+{ei4!oxN=}= zF_KWYxdxO8b2G@8+}37{2cd2( zvtA+D_G9tZ`-H7PX=59a^=rY{u>8L-Sz&%zTIWCDM8S8$D{$<@9??TXYmea! z&*Q#p@+%FV?a(-I3!+X4xMtXhm;H)z$r(xQ?YQL3<{Gegmt3%yx=g^3O{HwwVUaH8 zGAZ~~{%X$8!PbQxH-?X~_5~Yj0PK!9V|4eE=Aq~n+YZHCE^Rx^0Lmk53>zc0@daYE z*XxeCKE59u6CPosW2CsEJ;HLSsP9K*a<7{I(D%lhZpSAy!^Kn8s1D2k%H?J*%8ozG zBaQZLLciBFhn&8`aCUO8#Q%xc8S5m&Yz()E=%Jyr#|uVwRCLuO;vFqr>zk2uGSC7k*d6TKGQsm*=(1+b)NBFdRWISh0}=XO*2 z?A7L^LNezFreAff=pOhhW9^HnAOg!if)@u#Ve-m7@=C!(t&^3~wwnRE^dHd(Gn z-U&|`!@(kYXz=XvPIw-7*}PgcJT`3i<(=(N0=G11{tOVDwTkcM{Hz_Okr#V2Nxv5oQvF}YJiX&p+9N)Da?pJiDHuvkByS}B9R~Y3Ffg=A4 zC?Ao58-wx@J=z5JyMP=oT9bYw1vLK>xao2(M)xq!Ak&I0O8*z9&9_m9rybp?%?%)n z+DmaM#}RuVjfl6DxBL*m=d{0gd>MA<)@8~6RdVuvybZD>v##LMZER0&E_r6t$<1qD(O>V~lb`S1Grr>=*FNZZoV(A=$Obbr zMg#og+6T$ciznqO9~7GktISbFpz^K!LHm{4ALI|#km`p*PxvcS#h(wSWMLs12EX#( z8GL;BLGrG6GQL*n%N1o1HL6e50)QYv&VM-02W zSKi9*v1ElorKtIEYXB|l<(Hln6Y76gC+gKk{<+tM_X`5k>V@3Q%+m#WLrhg9&u>q> OAzQvK+dUKyh4_E90xCWL 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 d46819537554..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 a256ab46f7f5..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceDetails/AccessKeyCredentials.php +++ /dev/null @@ -1,146 +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 = ''; - /** - * Input only. AWS session token. - * Used only when AWS security token service (STS) is responsible for - * creating the temporary credentials. - * - * Generated from protobuf field string session_token = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $session_token = ''; - - /** - * 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. - * @type string $session_token - * Input only. AWS session token. - * Used only when AWS security token service (STS) is responsible for - * creating the temporary credentials. - * } - */ - 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; - } - - /** - * Input only. AWS session token. - * Used only when AWS security token service (STS) is responsible for - * creating the temporary credentials. - * - * Generated from protobuf field string session_token = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getSessionToken() - { - return $this->session_token; - } - - /** - * Input only. AWS session token. - * Used only when AWS security token service (STS) is responsible for - * creating the temporary credentials. - * - * Generated from protobuf field string session_token = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSessionToken($var) - { - GPBUtil::checkString($var, True); - $this->session_token = $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 5b4461d9a74e..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 -{ - /** - * Required. Key of tag. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key = ''; - /** - * Required. Value of tag. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * Required. Key of tag. - * @type string $value - * Required. Value of tag. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Required. Key of tag. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Required. Key of tag. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * Required. Value of tag. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * Required. Value of tag. - * - * Generated from protobuf field string value = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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 eaf005a088c3..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsSourceVmDetails.php +++ /dev/null @@ -1,217 +0,0 @@ -google.cloud.vmmigration.v1.AwsSourceVmDetails - */ -class AwsSourceVmDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The firmware type of the source VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $firmware = 0; - /** - * Output only. The total size of the disks being migrated in bytes. - * - * Generated from protobuf field int64 committed_storage_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $committed_storage_bytes = 0; - /** - * Output only. The disks attached to the source VM. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceVmDetails.AwsDiskDetails disks = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $disks; - /** - * Output only. Information about VM capabilities needed for some Compute - * Engine features. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmCapabilities vm_capabilities_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $vm_capabilities_info = null; - /** - * Output only. The VM architecture. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmArchitecture architecture = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $architecture = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $firmware - * Output only. The firmware type of the source VM. - * @type int|string $committed_storage_bytes - * Output only. The total size of the disks being migrated in bytes. - * @type array<\Google\Cloud\VMMigration\V1\AwsSourceVmDetails\AwsDiskDetails>|\Google\Protobuf\Internal\RepeatedField $disks - * Output only. The disks attached to the source VM. - * @type \Google\Cloud\VMMigration\V1\VmCapabilities $vm_capabilities_info - * Output only. Information about VM capabilities needed for some Compute - * Engine features. - * @type int $architecture - * Output only. The VM architecture. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The firmware type of the source VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getFirmware() - { - return $this->firmware; - } - - /** - * Output only. The firmware type of the source VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AwsSourceVmDetails.Firmware firmware = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setFirmware($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\AwsSourceVmDetails\Firmware::class); - $this->firmware = $var; - - return $this; - } - - /** - * Output only. The total size of the disks being migrated in bytes. - * - * Generated from protobuf field int64 committed_storage_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getCommittedStorageBytes() - { - return $this->committed_storage_bytes; - } - - /** - * Output only. The total size of the disks being migrated in bytes. - * - * Generated from protobuf field int64 committed_storage_bytes = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setCommittedStorageBytes($var) - { - GPBUtil::checkInt64($var); - $this->committed_storage_bytes = $var; - - return $this; - } - - /** - * Output only. The disks attached to the source VM. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceVmDetails.AwsDiskDetails disks = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDisks() - { - return $this->disks; - } - - /** - * Output only. The disks attached to the source VM. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.AwsSourceVmDetails.AwsDiskDetails disks = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\AwsSourceVmDetails\AwsDiskDetails>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDisks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\AwsSourceVmDetails\AwsDiskDetails::class); - $this->disks = $arr; - - return $this; - } - - /** - * Output only. Information about VM capabilities needed for some Compute - * Engine features. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmCapabilities vm_capabilities_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\VmCapabilities|null - */ - public function getVmCapabilitiesInfo() - { - return $this->vm_capabilities_info; - } - - public function hasVmCapabilitiesInfo() - { - return isset($this->vm_capabilities_info); - } - - public function clearVmCapabilitiesInfo() - { - unset($this->vm_capabilities_info); - } - - /** - * Output only. Information about VM capabilities needed for some Compute - * Engine features. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmCapabilities vm_capabilities_info = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\VmCapabilities $var - * @return $this - */ - public function setVmCapabilitiesInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmCapabilities::class); - $this->vm_capabilities_info = $var; - - return $this; - } - - /** - * Output only. The VM architecture. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmArchitecture architecture = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getArchitecture() - { - return $this->architecture; - } - - /** - * Output only. The VM architecture. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmArchitecture architecture = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setArchitecture($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\VmArchitecture::class); - $this->architecture = $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 07d9150484c6..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/AwsVmDetails.php +++ /dev/null @@ -1,683 +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 CPU cores 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; - /** - * The number of vCPUs the VM has. It is calculated as the - * number of CPU cores * threads per CPU the VM has. - * - * Generated from protobuf field int32 vcpu_count = 19; - */ - protected $vcpu_count = 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 CPU cores 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. - * @type int $vcpu_count - * The number of vCPUs the VM has. It is calculated as the - * number of CPU cores * threads per CPU the VM has. - * } - */ - 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 CPU cores the VM has. - * - * Generated from protobuf field int32 cpu_count = 6; - * @return int - */ - public function getCpuCount() - { - return $this->cpu_count; - } - - /** - * The number of CPU cores 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; - } - - /** - * The number of vCPUs the VM has. It is calculated as the - * number of CPU cores * threads per CPU the VM has. - * - * Generated from protobuf field int32 vcpu_count = 19; - * @return int - */ - public function getVcpuCount() - { - return $this->vcpu_count; - } - - /** - * The number of vCPUs the VM has. It is calculated as the - * number of CPU cores * threads per CPU the VM has. - * - * Generated from protobuf field int32 vcpu_count = 19; - * @param int $var - * @return $this - */ - public function setVcpuCount($var) - { - GPBUtil::checkInt32($var); - $this->vcpu_count = $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 bf8700fea7bc..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CloneJob.php +++ /dev/null @@ -1,403 +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\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails $compute_engine_disks_target_details - * Output only. Details of the target Persistent Disks 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. Details of the target Persistent Disks in Compute Engine. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDisksTargetDetails compute_engine_disks_target_details = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails|null - */ - public function getComputeEngineDisksTargetDetails() - { - return $this->readOneof(25); - } - - public function hasComputeEngineDisksTargetDetails() - { - return $this->hasOneof(25); - } - - /** - * Output only. Details of the target Persistent Disks in Compute Engine. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDisksTargetDetails compute_engine_disks_target_details = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails $var - * @return $this - */ - public function setComputeEngineDisksTargetDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails::class); - $this->writeOneof(25, $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 4126616e99b2..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineDiskType.php +++ /dev/null @@ -1,76 +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; - /** - * Hyperdisk balanced disk type. - * - * Generated from protobuf enum COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED = 4; - */ - const COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED = 4; - - 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', - self::COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_BALANCED => 'COMPUTE_ENGINE_DISK_TYPE_HYPERDISK_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 1d991762eeac..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDefaults.php +++ /dev/null @@ -1,906 +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 list 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; - /** - * Optional. The service account to associate the VM with. - * - * Generated from protobuf field string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - 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; - /** - * Optional. Defines whether the instance has vTPM enabled. - * This can be set to true only if the VM boot option is EFI. - * - * Generated from protobuf field bool enable_vtpm = 21 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_vtpm = false; - /** - * Optional. Defines whether the instance has integrity monitoring enabled. - * This can be set to true only if the VM boot option is EFI, and vTPM is - * enabled. - * - * Generated from protobuf field bool enable_integrity_monitoring = 22 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_integrity_monitoring = 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 = ''; - /** - * Optional. Immutable. The encryption to apply to the VM disks. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $encryption = null; - /** - * Optional. By default the virtual machine will keep its existing boot - * option. Setting this property will trigger an internal process which will - * convert the virtual machine from using the existing boot option to another. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 20 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $boot_conversion = 0; - /** - * Optional. Additional replica zones of the target regional disks. - * If this list is not empty a regional disk will be created. The first - * supported zone would be the one stated in the - * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDefaults.zone] field. - * The rest are taken from this list. Please refer to the [regional disk - * creation - * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) - * for further details about regional vs zonal disks. If not specified, a - * zonal disk will be created in the same zone the VM is created. - * - * Generated from protobuf field repeated string disk_replica_zones = 24 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $disk_replica_zones; - - /** - * 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 list 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 - * Optional. 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 bool $enable_vtpm - * Optional. Defines whether the instance has vTPM enabled. - * This can be set to true only if the VM boot option is EFI. - * @type bool $enable_integrity_monitoring - * Optional. Defines whether the instance has integrity monitoring enabled. - * This can be set to true only if the VM boot option is EFI, and vTPM is - * enabled. - * @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. - * @type \Google\Cloud\VMMigration\V1\Encryption $encryption - * Optional. Immutable. The encryption to apply to the VM disks. - * @type int $boot_conversion - * Optional. By default the virtual machine will keep its existing boot - * option. Setting this property will trigger an internal process which will - * convert the virtual machine from using the existing boot option to another. - * @type array|\Google\Protobuf\Internal\RepeatedField $disk_replica_zones - * Optional. Additional replica zones of the target regional disks. - * If this list is not empty a regional disk will be created. The first - * supported zone would be the one stated in the - * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDefaults.zone] field. - * The rest are taken from this list. Please refer to the [regional disk - * creation - * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) - * for further details about regional vs zonal disks. If not specified, a - * zonal disk will be created in the same zone the VM is created. - * } - */ - 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 list 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 list 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; - } - - /** - * Optional. The service account to associate the VM with. - * - * Generated from protobuf field string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getServiceAccount() - { - return $this->service_account; - } - - /** - * Optional. The service account to associate the VM with. - * - * Generated from protobuf field string service_account = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @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; - } - - /** - * Optional. Defines whether the instance has vTPM enabled. - * This can be set to true only if the VM boot option is EFI. - * - * Generated from protobuf field bool enable_vtpm = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableVtpm() - { - return $this->enable_vtpm; - } - - /** - * Optional. Defines whether the instance has vTPM enabled. - * This can be set to true only if the VM boot option is EFI. - * - * Generated from protobuf field bool enable_vtpm = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableVtpm($var) - { - GPBUtil::checkBool($var); - $this->enable_vtpm = $var; - - return $this; - } - - /** - * Optional. Defines whether the instance has integrity monitoring enabled. - * This can be set to true only if the VM boot option is EFI, and vTPM is - * enabled. - * - * Generated from protobuf field bool enable_integrity_monitoring = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableIntegrityMonitoring() - { - return $this->enable_integrity_monitoring; - } - - /** - * Optional. Defines whether the instance has integrity monitoring enabled. - * This can be set to true only if the VM boot option is EFI, and vTPM is - * enabled. - * - * Generated from protobuf field bool enable_integrity_monitoring = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableIntegrityMonitoring($var) - { - GPBUtil::checkBool($var); - $this->enable_integrity_monitoring = $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; - } - - /** - * Optional. Immutable. The encryption to apply to the VM disks. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\VMMigration\V1\Encryption|null - */ - public function getEncryption() - { - return $this->encryption; - } - - public function hasEncryption() - { - return isset($this->encryption); - } - - public function clearEncryption() - { - unset($this->encryption); - } - - /** - * Optional. Immutable. The encryption to apply to the VM disks. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 19 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\VMMigration\V1\Encryption $var - * @return $this - */ - public function setEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Encryption::class); - $this->encryption = $var; - - return $this; - } - - /** - * Optional. By default the virtual machine will keep its existing boot - * option. Setting this property will trigger an internal process which will - * convert the virtual machine from using the existing boot option to another. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getBootConversion() - { - return $this->boot_conversion; - } - - /** - * Optional. By default the virtual machine will keep its existing boot - * option. Setting this property will trigger an internal process which will - * convert the virtual machine from using the existing boot option to another. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setBootConversion($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\BootConversion::class); - $this->boot_conversion = $var; - - return $this; - } - - /** - * Optional. Additional replica zones of the target regional disks. - * If this list is not empty a regional disk will be created. The first - * supported zone would be the one stated in the - * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDefaults.zone] field. - * The rest are taken from this list. Please refer to the [regional disk - * creation - * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) - * for further details about regional vs zonal disks. If not specified, a - * zonal disk will be created in the same zone the VM is created. - * - * Generated from protobuf field repeated string disk_replica_zones = 24 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDiskReplicaZones() - { - return $this->disk_replica_zones; - } - - /** - * Optional. Additional replica zones of the target regional disks. - * If this list is not empty a regional disk will be created. The first - * supported zone would be the one stated in the - * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDefaults.zone] field. - * The rest are taken from this list. Please refer to the [regional disk - * creation - * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) - * for further details about regional vs zonal disks. If not specified, a - * zonal disk will be created in the same zone the VM is created. - * - * Generated from protobuf field repeated string disk_replica_zones = 24 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDiskReplicaZones($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->disk_replica_zones = $arr; - - 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 c014aa71e572..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeEngineTargetDetails.php +++ /dev/null @@ -1,890 +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 list 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; - /** - * Optional. Defines whether the instance has vTPM enabled. - * - * Generated from protobuf field bool enable_vtpm = 21 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_vtpm = false; - /** - * Optional. Defines whether the instance has integrity monitoring enabled. - * - * Generated from protobuf field bool enable_integrity_monitoring = 22 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_integrity_monitoring = 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 = ''; - /** - * Optional. The encryption to apply to the VM disks. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 19 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encryption = null; - /** - * Optional. By default the virtual machine will keep its existing boot - * option. Setting this property will trigger an internal process which will - * convert the virtual machine from using the existing boot option to another. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 20 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $boot_conversion = 0; - /** - * Optional. Additional replica zones of the target regional disks. - * If this list is not empty a regional disk will be created. The first - * supported zone would be the one stated in the - * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDetails.zone] field. - * The rest are taken from this list. Please refer to the [regional disk - * creation - * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) - * for further details about regional vs zonal disks. If not specified, a - * zonal disk will be created in the same zone the VM is created. - * - * Generated from protobuf field repeated string disk_replica_zones = 24 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $disk_replica_zones; - - /** - * 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 list 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 bool $enable_vtpm - * Optional. Defines whether the instance has vTPM enabled. - * @type bool $enable_integrity_monitoring - * Optional. Defines whether the instance has integrity monitoring enabled. - * @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. - * @type \Google\Cloud\VMMigration\V1\Encryption $encryption - * Optional. The encryption to apply to the VM disks. - * @type int $boot_conversion - * Optional. By default the virtual machine will keep its existing boot - * option. Setting this property will trigger an internal process which will - * convert the virtual machine from using the existing boot option to another. - * @type array|\Google\Protobuf\Internal\RepeatedField $disk_replica_zones - * Optional. Additional replica zones of the target regional disks. - * If this list is not empty a regional disk will be created. The first - * supported zone would be the one stated in the - * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDetails.zone] field. - * The rest are taken from this list. Please refer to the [regional disk - * creation - * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) - * for further details about regional vs zonal disks. If not specified, a - * zonal disk will be created in the same zone the VM is created. - * } - */ - 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 list 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 list 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; - } - - /** - * Optional. Defines whether the instance has vTPM enabled. - * - * Generated from protobuf field bool enable_vtpm = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableVtpm() - { - return $this->enable_vtpm; - } - - /** - * Optional. Defines whether the instance has vTPM enabled. - * - * Generated from protobuf field bool enable_vtpm = 21 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableVtpm($var) - { - GPBUtil::checkBool($var); - $this->enable_vtpm = $var; - - return $this; - } - - /** - * Optional. Defines whether the instance has integrity monitoring enabled. - * - * Generated from protobuf field bool enable_integrity_monitoring = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableIntegrityMonitoring() - { - return $this->enable_integrity_monitoring; - } - - /** - * Optional. Defines whether the instance has integrity monitoring enabled. - * - * Generated from protobuf field bool enable_integrity_monitoring = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableIntegrityMonitoring($var) - { - GPBUtil::checkBool($var); - $this->enable_integrity_monitoring = $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; - } - - /** - * Optional. The encryption to apply to the VM disks. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VMMigration\V1\Encryption|null - */ - public function getEncryption() - { - return $this->encryption; - } - - public function hasEncryption() - { - return isset($this->encryption); - } - - public function clearEncryption() - { - unset($this->encryption); - } - - /** - * Optional. The encryption to apply to the VM disks. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VMMigration\V1\Encryption $var - * @return $this - */ - public function setEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Encryption::class); - $this->encryption = $var; - - return $this; - } - - /** - * Optional. By default the virtual machine will keep its existing boot - * option. Setting this property will trigger an internal process which will - * convert the virtual machine from using the existing boot option to another. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getBootConversion() - { - return $this->boot_conversion; - } - - /** - * Optional. By default the virtual machine will keep its existing boot - * option. Setting this property will trigger an internal process which will - * convert the virtual machine from using the existing boot option to another. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.BootConversion boot_conversion = 20 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setBootConversion($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\BootConversion::class); - $this->boot_conversion = $var; - - return $this; - } - - /** - * Optional. Additional replica zones of the target regional disks. - * If this list is not empty a regional disk will be created. The first - * supported zone would be the one stated in the - * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDetails.zone] field. - * The rest are taken from this list. Please refer to the [regional disk - * creation - * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) - * for further details about regional vs zonal disks. If not specified, a - * zonal disk will be created in the same zone the VM is created. - * - * Generated from protobuf field repeated string disk_replica_zones = 24 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getDiskReplicaZones() - { - return $this->disk_replica_zones; - } - - /** - * Optional. Additional replica zones of the target regional disks. - * If this list is not empty a regional disk will be created. The first - * supported zone would be the one stated in the - * [zone][google.cloud.vmmigration.v1.ComputeEngineTargetDetails.zone] field. - * The rest are taken from this list. Please refer to the [regional disk - * creation - * API](https://cloud.google.com/compute/docs/regions-zones/global-regional-zonal-resources) - * for further details about regional vs zonal disks. If not specified, a - * zonal disk will be created in the same zone the VM is created. - * - * Generated from protobuf field repeated string disk_replica_zones = 24 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setDiskReplicaZones($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->disk_replica_zones = $arr; - - 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 2c038f9ccb9c..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ComputeScheduling.php +++ /dev/null @@ -1,208 +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 119c3418d7ff..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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a 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/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 041fd4c6d145..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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a 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/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 06e5d91a6460..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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a 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/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 6364b1934cb1..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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a 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/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 58176266340b..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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a 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/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 1ead753254f4..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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a 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/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 c8933d912aa1..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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a 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/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 4e9e80122c18..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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a 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/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 f8930646f96d..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/CutoverJob.php +++ /dev/null @@ -1,468 +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\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails $compute_engine_disks_target_details - * Output only. Details of the target Persistent Disks 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. Details of the target Persistent Disks in Compute Engine. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDisksTargetDetails compute_engine_disks_target_details = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails|null - */ - public function getComputeEngineDisksTargetDetails() - { - return $this->readOneof(20); - } - - public function hasComputeEngineDisksTargetDetails() - { - return $this->hasOneof(20); - } - - /** - * Output only. Details of the target Persistent Disks in Compute Engine. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDisksTargetDetails compute_engine_disks_target_details = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails $var - * @return $this - */ - public function setComputeEngineDisksTargetDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDetails::class); - $this->writeOneof(20, $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 46e04e917a45..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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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/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 60e62e2f1352..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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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 fecc2f1d3685..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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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 a31415afd16a..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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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 4c2b2b73e4c9..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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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 5a03c38c69aa..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/FetchInventoryResponse.php +++ /dev/null @@ -1,190 +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\Cloud\VMMigration\V1\AzureVmsDetails $azure_vms - * The description of the VMs in a Source of type Azure. - * @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; - } - - /** - * The description of the VMs in a Source of type Azure. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AzureVmsDetails azure_vms = 5; - * @return \Google\Cloud\VMMigration\V1\AzureVmsDetails|null - */ - public function getAzureVms() - { - return $this->readOneof(5); - } - - public function hasAzureVms() - { - return $this->hasOneof(5); - } - - /** - * The description of the VMs in a Source of type Azure. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AzureVmsDetails azure_vms = 5; - * @param \Google\Cloud\VMMigration\V1\AzureVmsDetails $var - * @return $this - */ - public function setAzureVms($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AzureVmsDetails::class); - $this->writeOneof(5, $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 ee1129f87c76..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Group.php +++ /dev/null @@ -1,258 +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 = ''; - /** - * Immutable. The target type of this group. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Group.MigrationTargetType migration_target_type = 6 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $migration_target_type = 0; - - /** - * 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. - * @type int $migration_target_type - * Immutable. The target type of this group. - * } - */ - 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; - } - - /** - * Immutable. The target type of this group. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Group.MigrationTargetType migration_target_type = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getMigrationTargetType() - { - return $this->migration_target_type; - } - - /** - * Immutable. The target type of this group. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Group.MigrationTargetType migration_target_type = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setMigrationTargetType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\Group\MigrationTargetType::class); - $this->migration_target_type = $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 41fa47c86dbd..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm.php +++ /dev/null @@ -1,1039 +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. Details 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. Details of the last replication cycle. This will be updated - * whenever a replication cycle is finished and is not to be confused with - * last_sync which is only updated on successful replication cycles. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle last_replication_cycle = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_replication_cycle = 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; - /** - * Output only. Provides details of future CutoverJobs of a MigratingVm. - * Set to empty when cutover forecast is unavailable. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverForecast cutover_forecast = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $cutover_forecast = null; - /** - * Output only. Provides details about the expiration state of the migrating - * VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.Expiration expiration = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expiration = null; - 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\ComputeEngineDisksTargetDefaults $compute_engine_disks_target_defaults - * Details of the target Persistent Disks in Compute Engine. - * @type \Google\Cloud\VMMigration\V1\VmwareSourceVmDetails $vmware_source_vm_details - * Output only. Details of the VM from a Vmware source. - * @type \Google\Cloud\VMMigration\V1\AwsSourceVmDetails $aws_source_vm_details - * Output only. Details of the VM from an AWS source. - * @type \Google\Cloud\VMMigration\V1\AzureSourceVmDetails $azure_source_vm_details - * Output only. Details of the VM from an Azure 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. Details of the current running replication cycle. - * @type \Google\Cloud\VMMigration\V1\ReplicationCycle $last_replication_cycle - * Output only. Details of the last replication cycle. This will be updated - * whenever a replication cycle is finished and is not to be confused with - * last_sync which is only updated on successful replication cycles. - * @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. - * @type \Google\Cloud\VMMigration\V1\CutoverForecast $cutover_forecast - * Output only. Provides details of future CutoverJobs of a MigratingVm. - * Set to empty when cutover forecast is unavailable. - * @type \Google\Cloud\VMMigration\V1\MigratingVm\Expiration $expiration - * Output only. Provides details about the expiration state of the migrating - * VM. - * } - */ - 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; - } - - /** - * Details of the target Persistent Disks in Compute Engine. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDisksTargetDefaults compute_engine_disks_target_defaults = 34; - * @return \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDefaults|null - */ - public function getComputeEngineDisksTargetDefaults() - { - return $this->readOneof(34); - } - - public function hasComputeEngineDisksTargetDefaults() - { - return $this->hasOneof(34); - } - - /** - * Details of the target Persistent Disks in Compute Engine. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineDisksTargetDefaults compute_engine_disks_target_defaults = 34; - * @param \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDefaults $var - * @return $this - */ - public function setComputeEngineDisksTargetDefaults($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ComputeEngineDisksTargetDefaults::class); - $this->writeOneof(34, $var); - - return $this; - } - - /** - * Output only. Details of the VM from a Vmware source. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareSourceVmDetails vmware_source_vm_details = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\VmwareSourceVmDetails|null - */ - public function getVmwareSourceVmDetails() - { - return $this->readOneof(28); - } - - public function hasVmwareSourceVmDetails() - { - return $this->hasOneof(28); - } - - /** - * Output only. Details of the VM from a Vmware source. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareSourceVmDetails vmware_source_vm_details = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\VmwareSourceVmDetails $var - * @return $this - */ - public function setVmwareSourceVmDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\VmwareSourceVmDetails::class); - $this->writeOneof(28, $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. Details of the VM from an Azure source. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AzureSourceVmDetails azure_source_vm_details = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\AzureSourceVmDetails|null - */ - public function getAzureSourceVmDetails() - { - return $this->readOneof(30); - } - - public function hasAzureSourceVmDetails() - { - return $this->hasOneof(30); - } - - /** - * Output only. Details of the VM from an Azure source. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AzureSourceVmDetails azure_source_vm_details = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\AzureSourceVmDetails $var - * @return $this - */ - public function setAzureSourceVmDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AzureSourceVmDetails::class); - $this->writeOneof(30, $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. Details 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. Details 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. Details of the last replication cycle. This will be updated - * whenever a replication cycle is finished and is not to be confused with - * last_sync which is only updated on successful replication cycles. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle last_replication_cycle = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\ReplicationCycle|null - */ - public function getLastReplicationCycle() - { - return $this->last_replication_cycle; - } - - public function hasLastReplicationCycle() - { - return isset($this->last_replication_cycle); - } - - public function clearLastReplicationCycle() - { - unset($this->last_replication_cycle); - } - - /** - * Output only. Details of the last replication cycle. This will be updated - * whenever a replication cycle is finished and is not to be confused with - * last_sync which is only updated on successful replication cycles. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ReplicationCycle last_replication_cycle = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\ReplicationCycle $var - * @return $this - */ - public function setLastReplicationCycle($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ReplicationCycle::class); - $this->last_replication_cycle = $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; - } - - /** - * Output only. Provides details of future CutoverJobs of a MigratingVm. - * Set to empty when cutover forecast is unavailable. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverForecast cutover_forecast = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\CutoverForecast|null - */ - public function getCutoverForecast() - { - return $this->cutover_forecast; - } - - public function hasCutoverForecast() - { - return isset($this->cutover_forecast); - } - - public function clearCutoverForecast() - { - unset($this->cutover_forecast); - } - - /** - * Output only. Provides details of future CutoverJobs of a MigratingVm. - * Set to empty when cutover forecast is unavailable. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.CutoverForecast cutover_forecast = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\CutoverForecast $var - * @return $this - */ - public function setCutoverForecast($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\CutoverForecast::class); - $this->cutover_forecast = $var; - - return $this; - } - - /** - * Output only. Provides details about the expiration state of the migrating - * VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.Expiration expiration = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VMMigration\V1\MigratingVm\Expiration|null - */ - public function getExpiration() - { - return $this->expiration; - } - - public function hasExpiration() - { - return isset($this->expiration); - } - - public function clearExpiration() - { - unset($this->expiration); - } - - /** - * Output only. Provides details about the expiration state of the migrating - * VM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.MigratingVm.Expiration expiration = 37 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VMMigration\V1\MigratingVm\Expiration $var - * @return $this - */ - public function setExpiration($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\MigratingVm\Expiration::class); - $this->expiration = $var; - - 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 81e1da94caf9..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigratingVm/State.php +++ /dev/null @@ -1,150 +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; - /** - * The migrating VM has passed its expiration date. It might be possible to - * bring it back to "Active" state by updating the TTL field. For more - * information, see the documentation. - * - * Generated from protobuf enum EXPIRED = 14; - */ - const EXPIRED = 14; - /** - * The migrating VM's has been finalized and migration resources have been - * removed. - * - * Generated from protobuf enum FINALIZED_EXPIRED = 17; - */ - const FINALIZED_EXPIRED = 17; - - 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', - self::EXPIRED => 'EXPIRED', - self::FINALIZED_EXPIRED => 'FINALIZED_EXPIRED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no 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 c0b141685209..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/MigrationError/ErrorCode.php +++ /dev/null @@ -1,134 +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 to Virtual Machines encountered an unknown error. - * - * Generated from protobuf enum UNKNOWN_ERROR = 1; - */ - const UNKNOWN_ERROR = 1; - /** - * Migrate to Virtual Machines encountered an error while validating - * replication source health. - * - * Generated from protobuf enum SOURCE_VALIDATION_ERROR = 2; - */ - const SOURCE_VALIDATION_ERROR = 2; - /** - * Migrate to Virtual Machines encountered an error during source data - * operation. - * - * Generated from protobuf enum SOURCE_REPLICATION_ERROR = 3; - */ - const SOURCE_REPLICATION_ERROR = 3; - /** - * Migrate to Virtual Machines encountered an error during target data - * operation. - * - * Generated from protobuf enum TARGET_REPLICATION_ERROR = 4; - */ - const TARGET_REPLICATION_ERROR = 4; - /** - * Migrate to Virtual Machines encountered an error during OS adaptation. - * - * Generated from protobuf enum OS_ADAPTATION_ERROR = 5; - */ - const OS_ADAPTATION_ERROR = 5; - /** - * Migrate to Virtual Machines encountered an error in clone operation. - * - * Generated from protobuf enum CLONE_ERROR = 6; - */ - const CLONE_ERROR = 6; - /** - * Migrate to Virtual Machines encountered an error in cutover operation. - * - * Generated from protobuf enum CUTOVER_ERROR = 7; - */ - const CUTOVER_ERROR = 7; - /** - * Migrate to Virtual Machines encountered an error during utilization - * report creation. - * - * Generated from protobuf enum UTILIZATION_REPORT_ERROR = 8; - */ - const UTILIZATION_REPORT_ERROR = 8; - /** - * Migrate to Virtual Machines encountered an error during appliance - * upgrade. - * - * Generated from protobuf enum APPLIANCE_UPGRADE_ERROR = 9; - */ - const APPLIANCE_UPGRADE_ERROR = 9; - /** - * Migrate to Virtual Machines encountered an error in image import - * operation. - * - * Generated from protobuf enum IMAGE_IMPORT_ERROR = 10; - */ - const IMAGE_IMPORT_ERROR = 10; - /** - * Migrate to Virtual Machines encountered an error in disk migration - * operation. - * - * Generated from protobuf enum DISK_MIGRATION_ERROR = 11; - */ - const DISK_MIGRATION_ERROR = 11; - - 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', - self::IMAGE_IMPORT_ERROR => 'IMAGE_IMPORT_ERROR', - self::DISK_MIGRATION_ERROR => 'DISK_MIGRATION_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 2da4d08f8b54..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/NetworkInterface.php +++ /dev/null @@ -1,219 +0,0 @@ -google.cloud.vmmigration.v1.NetworkInterface - */ -class NetworkInterface extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The network to connect the NIC to. - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $network = ''; - /** - * Optional. The subnetwork to connect the NIC to. - * - * Generated from protobuf field string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $subnetwork = ''; - /** - * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $internal_ip = ''; - /** - * Optional. The external IP to define in the NIC. - * - * Generated from protobuf field string external_ip = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $external_ip = ''; - /** - * Optional. The networking tier used for optimizing connectivity between - * instances and systems on the internet. Applies only for external ephemeral - * IP addresses. If left empty, will default to PREMIUM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineNetworkTier network_tier = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $network_tier = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $network - * Optional. The network to connect the NIC to. - * @type string $subnetwork - * Optional. The subnetwork to connect the NIC to. - * @type string $internal_ip - * Optional. 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 - * Optional. The external IP to define in the NIC. - * @type int $network_tier - * Optional. The networking tier used for optimizing connectivity between - * instances and systems on the internet. Applies only for external ephemeral - * IP addresses. If left empty, will default to PREMIUM. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Vmmigration\V1\Vmmigration::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The network to connect the NIC to. - * - * Generated from protobuf field string network = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getNetwork() - { - return $this->network; - } - - /** - * Optional. The network to connect the NIC to. - * - * 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. The subnetwork to connect the NIC to. - * - * Generated from protobuf field string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSubnetwork() - { - return $this->subnetwork; - } - - /** - * Optional. The subnetwork to connect the NIC to. - * - * Generated from protobuf field string subnetwork = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSubnetwork($var) - { - GPBUtil::checkString($var, True); - $this->subnetwork = $var; - - return $this; - } - - /** - * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getInternalIp() - { - return $this->internal_ip; - } - - /** - * Optional. 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 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setInternalIp($var) - { - GPBUtil::checkString($var, True); - $this->internal_ip = $var; - - return $this; - } - - /** - * Optional. The external IP to define in the NIC. - * - * Generated from protobuf field string external_ip = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getExternalIp() - { - return $this->external_ip; - } - - /** - * Optional. The external IP to define in the NIC. - * - * Generated from protobuf field string external_ip = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setExternalIp($var) - { - GPBUtil::checkString($var, True); - $this->external_ip = $var; - - return $this; - } - - /** - * Optional. The networking tier used for optimizing connectivity between - * instances and systems on the internet. Applies only for external ephemeral - * IP addresses. If left empty, will default to PREMIUM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineNetworkTier network_tier = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getNetworkTier() - { - return $this->network_tier; - } - - /** - * Optional. The networking tier used for optimizing connectivity between - * instances and systems on the internet. Applies only for external ephemeral - * IP addresses. If left empty, will default to PREMIUM. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.ComputeEngineNetworkTier network_tier = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setNetworkTier($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\ComputeEngineNetworkTier::class); - $this->network_tier = $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 639b3d34f93e..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/ReplicationCycle.php +++ /dev/null @@ -1,433 +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; - /** - * Output only. Provides details on the state of the cycle in case of an - * error. - * - * Generated from protobuf field .google.rpc.Status error = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $error = null; - /** - * Output only. Warnings that occurred during the cycle. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigrationWarning warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $warnings; - - /** - * 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 - * Output only. Provides details on the state of the cycle in case of an - * error. - * @type array<\Google\Cloud\VMMigration\V1\MigrationWarning>|\Google\Protobuf\Internal\RepeatedField $warnings - * Output only. Warnings that occurred during the cycle. - * } - */ - 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() - { - if ($this->progress_percent !== 0) { - @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; - } - - /** - * Output only. Provides details on the state of the cycle in case of an - * error. - * - * 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. Provides details on the state of the cycle in case of an - * error. - * - * 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; - } - - /** - * Output only. Warnings that occurred during the cycle. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigrationWarning warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWarnings() - { - return $this->warnings; - } - - /** - * Output only. Warnings that occurred during the cycle. - * - * Generated from protobuf field repeated .google.cloud.vmmigration.v1.MigrationWarning warnings = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Cloud\VMMigration\V1\MigrationWarning>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWarnings($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VMMigration\V1\MigrationWarning::class); - $this->warnings = $arr; - - 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 64e8c843ffe2..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/Source.php +++ /dev/null @@ -1,380 +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 = ''; - /** - * Optional. Immutable. The encryption details of the source data stored by - * the service. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $encryption = null; - 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 \Google\Cloud\VMMigration\V1\AzureSourceDetails $azure - * Azure 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. - * @type \Google\Cloud\VMMigration\V1\Encryption $encryption - * Optional. Immutable. The encryption details of the source data stored by - * the service. - * } - */ - 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; - } - - /** - * Azure type source details. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AzureSourceDetails azure = 13; - * @return \Google\Cloud\VMMigration\V1\AzureSourceDetails|null - */ - public function getAzure() - { - return $this->readOneof(13); - } - - public function hasAzure() - { - return $this->hasOneof(13); - } - - /** - * Azure type source details. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.AzureSourceDetails azure = 13; - * @param \Google\Cloud\VMMigration\V1\AzureSourceDetails $var - * @return $this - */ - public function setAzure($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\AzureSourceDetails::class); - $this->writeOneof(13, $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; - } - - /** - * Optional. Immutable. The encryption details of the source data stored by - * the service. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\VMMigration\V1\Encryption|null - */ - public function getEncryption() - { - return $this->encryption; - } - - public function hasEncryption() - { - return isset($this->encryption); - } - - public function clearEncryption() - { - unset($this->encryption); - } - - /** - * Optional. Immutable. The encryption details of the source data stored by - * the service. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.Encryption encryption = 14 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\VMMigration\V1\Encryption $var - * @return $this - */ - public function setEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\Encryption::class); - $this->encryption = $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 0873fbf6555d..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 = ''; - /** - * Required. The target project ID (number) or project name. - * - * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - 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 - * Required. 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; - } - - /** - * Required. The target project ID (number) or project name. - * - * Generated from protobuf field string project = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProject() - { - return $this->project; - } - - /** - * Required. The target project ID (number) or project name. - * - * 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; - } - - /** - * 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 aee8dc2cfe74..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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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/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 ece9ca29fdc3..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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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/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 ceda1257271e..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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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/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 ae1b70e4fbe9..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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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/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 b30ae788955e..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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating 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 - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be 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/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 de974a62e49f..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/UpgradeStatus.php +++ /dev/null @@ -1,227 +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; - /** - * Output only. Provides details on the state of the upgrade operation in case - * of an error. - * - * Generated from protobuf field .google.rpc.Status error = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - 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 - * Output only. 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; - } - - /** - * Output only. Provides details on the state of the upgrade operation in case - * of an error. - * - * Generated from protobuf field .google.rpc.Status error = 3 [(.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 upgrade operation in case - * of an error. - * - * Generated from protobuf field .google.rpc.Status error = 3 [(.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 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 a1382ea205c4..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareSourceDetails.php +++ /dev/null @@ -1,208 +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 = ''; - /** - * The hostname of the vcenter. - * - * Generated from protobuf field string resolved_vcenter_host = 5; - */ - protected $resolved_vcenter_host = ''; - - /** - * 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. - * @type string $resolved_vcenter_host - * The hostname of 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; - } - - /** - * The hostname of the vcenter. - * - * Generated from protobuf field string resolved_vcenter_host = 5; - * @return string - */ - public function getResolvedVcenterHost() - { - return $this->resolved_vcenter_host; - } - - /** - * The hostname of the vcenter. - * - * Generated from protobuf field string resolved_vcenter_host = 5; - * @param string $var - * @return $this - */ - public function setResolvedVcenterHost($var) - { - GPBUtil::checkString($var, True); - $this->resolved_vcenter_host = $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 ac8e71353c47..000000000000 --- a/owl-bot-staging/VmMigration/v1/proto/src/Google/Cloud/VMMigration/V1/VmwareVmDetails.php +++ /dev/null @@ -1,487 +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; - /** - * Output only. The CPU architecture. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.VmArchitecture architecture = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $architecture = 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. - * @type int $architecture - * Output only. The CPU architecture. - * } - */ - 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; - } - - /** - * Output only. The CPU architecture. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.VmArchitecture architecture = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getArchitecture() - { - return $this->architecture; - } - - /** - * Output only. The CPU architecture. - * - * Generated from protobuf field .google.cloud.vmmigration.v1.VmwareVmDetails.VmArchitecture architecture = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setArchitecture($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VMMigration\V1\VmwareVmDetails\VmArchitecture::class); - $this->architecture = $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 5a96160d9454..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 637b64dfccfd..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 8ff915868b0b..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 07fb9fe8065a..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 112aedf9305b..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 fd49a34265e4..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 3006a32c3d9f..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 fde4d8d5ebc9..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 7de6c9f219ff..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 ab4a87c186cd..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/create_target_project.php +++ /dev/null @@ -1,97 +0,0 @@ -setProject($targetProjectProject); - $request = (new CreateTargetProjectRequest()) - ->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]'; - $targetProjectProject = '[PROJECT]'; - - create_target_project_sample($formattedParent, $targetProjectId, $targetProjectProject); -} -// [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 ffa84f253503..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 9e88bc377809..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 4adfe8b56533..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 6c9989b20019..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 151e33a858c6..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 cd46935fb5be..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 40b57bceea89..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 5512fd9bd4c1..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 6b0402be48ef..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 c80d5ffdd304..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 83e35aec592d..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 361123c8495f..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 53c915ed667d..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 52d99b397f52..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 c106af7b7bfd..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 8a98a9674f2a..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 cc7bef758257..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 7651ead254c0..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 21d4d911d13c..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 45b51a1dc151..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_clone_jobs.php +++ /dev/null @@ -1,88 +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 685e99958a2e..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/list_cutover_jobs.php +++ /dev/null @@ -1,88 +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 085978e55a24..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 6dbbbb6c1974..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 87344babd960..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 6d37ec241276..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 9830ec51d9bd..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 3147e4db7d10..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 ac607ae78b95..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 945b374f0a3e..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 6f0eebc2346f..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 d72b4cb52785..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 cbaa55c08591..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 a3d10a793d4b..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 173699beeacf..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 ff57c1dc109f..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 652c7e7171be..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 708db8c77fde..000000000000 --- a/owl-bot-staging/VmMigration/v1/samples/V1/VmMigrationClient/update_target_project.php +++ /dev/null @@ -1,87 +0,0 @@ -setProject($targetProjectProject); - $request = (new UpdateTargetProjectRequest()) - ->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()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $targetProjectProject = '[PROJECT]'; - - update_target_project_sample($targetProjectProject); -} -// [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 db3ea44cf6db..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 6fef1d9a3c3f..000000000000 --- a/owl-bot-staging/VmMigration/v1/src/V1/Client/VmMigrationClient.php +++ /dev/null @@ -1,2437 +0,0 @@ - addGroupMigrationAsync(AddGroupMigrationRequest $request, array $optionalArgs = []) - * @method PromiseInterface cancelCloneJobAsync(CancelCloneJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface cancelCutoverJobAsync(CancelCutoverJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface cancelDiskMigrationJobAsync(CancelDiskMigrationJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface cancelImageImportJobAsync(CancelImageImportJobRequest $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 createDiskMigrationJobAsync(CreateDiskMigrationJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface createGroupAsync(CreateGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface createImageImportAsync(CreateImageImportRequest $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 deleteDiskMigrationJobAsync(DeleteDiskMigrationJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteGroupAsync(DeleteGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteImageImportAsync(DeleteImageImportRequest $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 extendMigrationAsync(ExtendMigrationRequest $request, array $optionalArgs = []) - * @method PromiseInterface fetchInventoryAsync(FetchInventoryRequest $request, array $optionalArgs = []) - * @method PromiseInterface fetchStorageInventoryAsync(FetchStorageInventoryRequest $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 getDiskMigrationJobAsync(GetDiskMigrationJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface getGroupAsync(GetGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getImageImportAsync(GetImageImportRequest $request, array $optionalArgs = []) - * @method PromiseInterface getImageImportJobAsync(GetImageImportJobRequest $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 listDiskMigrationJobsAsync(ListDiskMigrationJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGroupsAsync(ListGroupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listImageImportJobsAsync(ListImageImportJobsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listImageImportsAsync(ListImageImportsRequest $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 runDiskMigrationJobAsync(RunDiskMigrationJobRequest $request, array $optionalArgs = []) - * @method PromiseInterface startMigrationAsync(StartMigrationRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDiskMigrationJobAsync(UpdateDiskMigrationJobRequest $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 crypto_key - * resource. - * - * @param string $project - * @param string $location - * @param string $keyRing - * @param string $cryptoKey - * - * @return string The formatted crypto_key resource. - */ - public static function cryptoKeyName(string $project, string $location, string $keyRing, string $cryptoKey): string - { - return self::getPathTemplate('cryptoKey')->render([ - 'project' => $project, - 'location' => $location, - 'key_ring' => $keyRing, - 'crypto_key' => $cryptoKey, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a 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 - * disk_migration_job resource. - * - * @param string $project - * @param string $location - * @param string $source - * @param string $diskMigrationJob - * - * @return string The formatted disk_migration_job resource. - */ - public static function diskMigrationJobName(string $project, string $location, string $source, string $diskMigrationJob): string - { - return self::getPathTemplate('diskMigrationJob')->render([ - 'project' => $project, - 'location' => $location, - 'source' => $source, - 'disk_migration_job' => $diskMigrationJob, - ]); - } - - /** - * 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 image - * resource. - * - * @param string $project - * @param string $image - * - * @return string The formatted image resource. - */ - public static function imageName(string $project, string $image): string - { - return self::getPathTemplate('image')->render([ - 'project' => $project, - 'image' => $image, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a image_import - * resource. - * - * @param string $project - * @param string $location - * @param string $job - * - * @return string The formatted image_import resource. - */ - public static function imageImportName(string $project, string $location, string $job): string - { - return self::getPathTemplate('imageImport')->render([ - 'project' => $project, - 'location' => $location, - 'job' => $job, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * image_import_job resource. - * - * @param string $project - * @param string $location - * @param string $job - * @param string $result - * - * @return string The formatted image_import_job resource. - */ - public static function imageImportJobName(string $project, string $location, string $job, string $result): string - { - return self::getPathTemplate('imageImportJob')->render([ - 'project' => $project, - 'location' => $location, - 'job' => $job, - 'result' => $result, - ]); - } - - /** - * 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 - * service_account resource. - * - * @param string $project - * @param string $serviceAccount - * - * @return string The formatted service_account resource. - */ - public static function serviceAccountName(string $project, string $serviceAccount): string - { - return self::getPathTemplate('serviceAccount')->render([ - 'project' => $project, - 'service_account' => $serviceAccount, - ]); - } - - /** - * 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} - * - cryptoKey: projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key} - * - cutoverJob: projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job} - * - datacenterConnector: projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector} - * - diskMigrationJob: projects/{project}/locations/{location}/sources/{source}/diskMigrationJobs/{disk_migration_job} - * - group: projects/{project}/locations/{location}/groups/{group} - * - image: projects/{project}/global/images/{image} - * - imageImport: projects/{project}/locations/{location}/imageImports/{job} - * - imageImportJob: projects/{project}/locations/{location}/imageImports/{job}/imageImportJobs/{result} - * - 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} - * - serviceAccount: projects/{project}/serviceAccounts/{service_account} - * - 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. - * *Important*: If you accept a credential configuration (credential - * JSON/File/Stream) from an external source for authentication to Google Cloud - * Platform, you must validate it before providing it to any Google API or library. - * Providing an unvalidated credential configuration to Google APIs can compromise - * the security of your systems and data. For more information {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * } - * - * @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(); - } - - /** - * Cancels the disk migration job. - * - * The async variant is {@see VmMigrationClient::cancelDiskMigrationJobAsync()} . - * - * @example samples/V1/VmMigrationClient/cancel_disk_migration_job.php - * - * @param CancelDiskMigrationJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function cancelDiskMigrationJob(CancelDiskMigrationJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CancelDiskMigrationJob', $request, $callOptions)->wait(); - } - - /** - * Initiates the cancellation of a running clone job. - * - * The async variant is {@see VmMigrationClient::cancelImageImportJobAsync()} . - * - * @example samples/V1/VmMigrationClient/cancel_image_import_job.php - * - * @param CancelImageImportJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function cancelImageImportJob(CancelImageImportJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CancelImageImportJob', $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 disk migration job in a given Source. - * - * The async variant is {@see VmMigrationClient::createDiskMigrationJobAsync()} . - * - * @example samples/V1/VmMigrationClient/create_disk_migration_job.php - * - * @param CreateDiskMigrationJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createDiskMigrationJob(CreateDiskMigrationJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateDiskMigrationJob', $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 ImageImport in a given project. - * - * The async variant is {@see VmMigrationClient::createImageImportAsync()} . - * - * @example samples/V1/VmMigrationClient/create_image_import.php - * - * @param CreateImageImportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createImageImport(CreateImageImportRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateImageImport', $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 DiskMigrationJob. - * - * The async variant is {@see VmMigrationClient::deleteDiskMigrationJobAsync()} . - * - * @example samples/V1/VmMigrationClient/delete_disk_migration_job.php - * - * @param DeleteDiskMigrationJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteDiskMigrationJob(DeleteDiskMigrationJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteDiskMigrationJob', $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 ImageImport. - * - * The async variant is {@see VmMigrationClient::deleteImageImportAsync()} . - * - * @example samples/V1/VmMigrationClient/delete_image_import.php - * - * @param DeleteImageImportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteImageImport(DeleteImageImportRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteImageImport', $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(); - } - - /** - * Extend the migrating VM time to live. - * - * The async variant is {@see VmMigrationClient::extendMigrationAsync()} . - * - * @example samples/V1/VmMigrationClient/extend_migration.php - * - * @param ExtendMigrationRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function extendMigration(ExtendMigrationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ExtendMigration', $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(); - } - - /** - * List remote source's inventory of storage resources. - * The remote source is another cloud vendor (e.g. AWS, Azure). - * The inventory describes the list of existing storage resources in that - * source. Note that this operation lists the resources on the remote source, - * as opposed to listing the MigratingVms resources in the vmmigration - * service. - * - * The async variant is {@see VmMigrationClient::fetchStorageInventoryAsync()} . - * - * @example samples/V1/VmMigrationClient/fetch_storage_inventory.php - * - * @param FetchStorageInventoryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function fetchStorageInventory(FetchStorageInventoryRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('FetchStorageInventory', $request, $callOptions); - } - - /** - * 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 DiskMigrationJob. - * - * The async variant is {@see VmMigrationClient::getDiskMigrationJobAsync()} . - * - * @example samples/V1/VmMigrationClient/get_disk_migration_job.php - * - * @param GetDiskMigrationJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return DiskMigrationJob - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDiskMigrationJob(GetDiskMigrationJobRequest $request, array $callOptions = []): DiskMigrationJob - { - return $this->startApiCall('GetDiskMigrationJob', $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 ImageImport. - * - * The async variant is {@see VmMigrationClient::getImageImportAsync()} . - * - * @example samples/V1/VmMigrationClient/get_image_import.php - * - * @param GetImageImportRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ImageImport - * - * @throws ApiException Thrown if the API call fails. - */ - public function getImageImport(GetImageImportRequest $request, array $callOptions = []): ImageImport - { - return $this->startApiCall('GetImageImport', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single ImageImportJob. - * - * The async variant is {@see VmMigrationClient::getImageImportJobAsync()} . - * - * @example samples/V1/VmMigrationClient/get_image_import_job.php - * - * @param GetImageImportJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ImageImportJob - * - * @throws ApiException Thrown if the API call fails. - */ - public function getImageImportJob(GetImageImportJobRequest $request, array $callOptions = []): ImageImportJob - { - return $this->startApiCall('GetImageImportJob', $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 the CloneJobs of a migrating VM. Only 25 most recent CloneJobs are - * listed. - * - * 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 the CutoverJobs of a migrating VM. Only 25 most recent CutoverJobs - * are listed. - * - * 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 DiskMigrationJobs in a given Source. - * - * The async variant is {@see VmMigrationClient::listDiskMigrationJobsAsync()} . - * - * @example samples/V1/VmMigrationClient/list_disk_migration_jobs.php - * - * @param ListDiskMigrationJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listDiskMigrationJobs(ListDiskMigrationJobsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDiskMigrationJobs', $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 ImageImportJobs in a given project. - * - * The async variant is {@see VmMigrationClient::listImageImportJobsAsync()} . - * - * @example samples/V1/VmMigrationClient/list_image_import_jobs.php - * - * @param ListImageImportJobsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listImageImportJobs(ListImageImportJobsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListImageImportJobs', $request, $callOptions); - } - - /** - * Lists ImageImports in a given project. - * - * The async variant is {@see VmMigrationClient::listImageImportsAsync()} . - * - * @example samples/V1/VmMigrationClient/list_image_imports.php - * - * @param ListImageImportsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listImageImports(ListImageImportsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListImageImports', $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(); - } - - /** - * Runs the disk migration job. - * - * The async variant is {@see VmMigrationClient::runDiskMigrationJobAsync()} . - * - * @example samples/V1/VmMigrationClient/run_disk_migration_job.php - * - * @param RunDiskMigrationJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function runDiskMigrationJob(RunDiskMigrationJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RunDiskMigrationJob', $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 DiskMigrationJob. - * - * The async variant is {@see VmMigrationClient::updateDiskMigrationJobAsync()} . - * - * @example samples/V1/VmMigrationClient/update_disk_migration_job.php - * - * @param UpdateDiskMigrationJobRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateDiskMigrationJob(UpdateDiskMigrationJobRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateDiskMigrationJob', $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 079a61db5e12..000000000000 --- a/owl-bot-staging/VmMigration/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,338 +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" - ] - }, - "CancelDiskMigrationJob": { - "methods": [ - "cancelDiskMigrationJob" - ] - }, - "CancelImageImportJob": { - "methods": [ - "cancelImageImportJob" - ] - }, - "CreateCloneJob": { - "methods": [ - "createCloneJob" - ] - }, - "CreateCutoverJob": { - "methods": [ - "createCutoverJob" - ] - }, - "CreateDatacenterConnector": { - "methods": [ - "createDatacenterConnector" - ] - }, - "CreateDiskMigrationJob": { - "methods": [ - "createDiskMigrationJob" - ] - }, - "CreateGroup": { - "methods": [ - "createGroup" - ] - }, - "CreateImageImport": { - "methods": [ - "createImageImport" - ] - }, - "CreateMigratingVm": { - "methods": [ - "createMigratingVm" - ] - }, - "CreateSource": { - "methods": [ - "createSource" - ] - }, - "CreateTargetProject": { - "methods": [ - "createTargetProject" - ] - }, - "CreateUtilizationReport": { - "methods": [ - "createUtilizationReport" - ] - }, - "DeleteDatacenterConnector": { - "methods": [ - "deleteDatacenterConnector" - ] - }, - "DeleteDiskMigrationJob": { - "methods": [ - "deleteDiskMigrationJob" - ] - }, - "DeleteGroup": { - "methods": [ - "deleteGroup" - ] - }, - "DeleteImageImport": { - "methods": [ - "deleteImageImport" - ] - }, - "DeleteMigratingVm": { - "methods": [ - "deleteMigratingVm" - ] - }, - "DeleteSource": { - "methods": [ - "deleteSource" - ] - }, - "DeleteTargetProject": { - "methods": [ - "deleteTargetProject" - ] - }, - "DeleteUtilizationReport": { - "methods": [ - "deleteUtilizationReport" - ] - }, - "ExtendMigration": { - "methods": [ - "extendMigration" - ] - }, - "FetchInventory": { - "methods": [ - "fetchInventory" - ] - }, - "FetchStorageInventory": { - "methods": [ - "fetchStorageInventory" - ] - }, - "FinalizeMigration": { - "methods": [ - "finalizeMigration" - ] - }, - "GetCloneJob": { - "methods": [ - "getCloneJob" - ] - }, - "GetCutoverJob": { - "methods": [ - "getCutoverJob" - ] - }, - "GetDatacenterConnector": { - "methods": [ - "getDatacenterConnector" - ] - }, - "GetDiskMigrationJob": { - "methods": [ - "getDiskMigrationJob" - ] - }, - "GetGroup": { - "methods": [ - "getGroup" - ] - }, - "GetImageImport": { - "methods": [ - "getImageImport" - ] - }, - "GetImageImportJob": { - "methods": [ - "getImageImportJob" - ] - }, - "GetMigratingVm": { - "methods": [ - "getMigratingVm" - ] - }, - "GetReplicationCycle": { - "methods": [ - "getReplicationCycle" - ] - }, - "GetSource": { - "methods": [ - "getSource" - ] - }, - "GetTargetProject": { - "methods": [ - "getTargetProject" - ] - }, - "GetUtilizationReport": { - "methods": [ - "getUtilizationReport" - ] - }, - "ListCloneJobs": { - "methods": [ - "listCloneJobs" - ] - }, - "ListCutoverJobs": { - "methods": [ - "listCutoverJobs" - ] - }, - "ListDatacenterConnectors": { - "methods": [ - "listDatacenterConnectors" - ] - }, - "ListDiskMigrationJobs": { - "methods": [ - "listDiskMigrationJobs" - ] - }, - "ListGroups": { - "methods": [ - "listGroups" - ] - }, - "ListImageImportJobs": { - "methods": [ - "listImageImportJobs" - ] - }, - "ListImageImports": { - "methods": [ - "listImageImports" - ] - }, - "ListMigratingVms": { - "methods": [ - "listMigratingVms" - ] - }, - "ListReplicationCycles": { - "methods": [ - "listReplicationCycles" - ] - }, - "ListSources": { - "methods": [ - "listSources" - ] - }, - "ListTargetProjects": { - "methods": [ - "listTargetProjects" - ] - }, - "ListUtilizationReports": { - "methods": [ - "listUtilizationReports" - ] - }, - "PauseMigration": { - "methods": [ - "pauseMigration" - ] - }, - "RemoveGroupMigration": { - "methods": [ - "removeGroupMigration" - ] - }, - "ResumeMigration": { - "methods": [ - "resumeMigration" - ] - }, - "RunDiskMigrationJob": { - "methods": [ - "runDiskMigrationJob" - ] - }, - "StartMigration": { - "methods": [ - "startMigration" - ] - }, - "UpdateDiskMigrationJob": { - "methods": [ - "updateDiskMigrationJob" - ] - }, - "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 9cb301193296..000000000000 --- a/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_client_config.json +++ /dev/null @@ -1,372 +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" - }, - "CancelDiskMigrationJob": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CancelImageImportJob": { - "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" - }, - "CreateDiskMigrationJob": { - "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" - }, - "CreateImageImport": { - "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" - }, - "DeleteDiskMigrationJob": { - "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" - }, - "DeleteImageImport": { - "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" - }, - "ExtendMigration": { - "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" - }, - "FetchStorageInventory": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_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" - }, - "GetDiskMigrationJob": { - "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" - }, - "GetImageImport": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetImageImportJob": { - "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" - }, - "ListDiskMigrationJobs": { - "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" - }, - "ListImageImportJobs": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListImageImports": { - "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" - }, - "RunDiskMigrationJob": { - "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" - }, - "UpdateDiskMigrationJob": { - "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 dbd8632aed89..000000000000 --- a/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_descriptor_config.php +++ /dev/null @@ -1,1185 +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', - ], - ], - ], - ], - 'CancelDiskMigrationJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CancelDiskMigrationJobResponse', - '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', - ], - ], - ], - ], - 'CancelImageImportJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\CancelImageImportJobResponse', - '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', - ], - ], - ], - ], - 'CreateDiskMigrationJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\DiskMigrationJob', - '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', - ], - ], - ], - ], - 'CreateImageImport' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\ImageImport', - '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', - ], - ], - ], - ], - 'DeleteDiskMigrationJob' => [ - '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', - ], - ], - ], - ], - 'DeleteImageImport' => [ - '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', - ], - ], - ], - ], - 'ExtendMigration' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\ExtendMigrationResponse', - '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', - ], - ], - ], - ], - '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', - ], - ], - ], - ], - 'RunDiskMigrationJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\RunDiskMigrationJobResponse', - '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', - ], - ], - ], - ], - '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', - ], - ], - ], - ], - 'UpdateDiskMigrationJob' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VMMigration\V1\DiskMigrationJob', - 'metadataReturnType' => '\Google\Cloud\VMMigration\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'disk_migration_job.name', - 'fieldAccessors' => [ - 'getDiskMigrationJob', - 'getName', - ], - ], - ], - ], - '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', - ], - ], - ], - ], - 'FetchStorageInventory' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getResources', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\FetchStorageInventoryResponse', - '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', - ], - ], - ], - ], - 'GetDiskMigrationJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\DiskMigrationJob', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\Group', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetImageImport' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ImageImport', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetImageImportJob' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ImageImportJob', - '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', - ], - ], - ], - ], - 'ListDiskMigrationJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDiskMigrationJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListDiskMigrationJobsResponse', - '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', - ], - ], - ], - ], - 'ListImageImportJobs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getImageImportJobs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListImageImportJobsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListImageImports' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getImageImports', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VMMigration\V1\ListImageImportsResponse', - '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}', - 'cryptoKey' => 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}', - 'cutoverJob' => 'projects/{project}/locations/{location}/sources/{source}/migratingVms/{migrating_vm}/cutoverJobs/{cutover_job}', - 'datacenterConnector' => 'projects/{project}/locations/{location}/sources/{source}/datacenterConnectors/{datacenter_connector}', - 'diskMigrationJob' => 'projects/{project}/locations/{location}/sources/{source}/diskMigrationJobs/{disk_migration_job}', - 'group' => 'projects/{project}/locations/{location}/groups/{group}', - 'image' => 'projects/{project}/global/images/{image}', - 'imageImport' => 'projects/{project}/locations/{location}/imageImports/{job}', - 'imageImportJob' => 'projects/{project}/locations/{location}/imageImports/{job}/imageImportJobs/{result}', - '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}', - 'serviceAccount' => 'projects/{project}/serviceAccounts/{service_account}', - '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 db1565a10ed2..000000000000 --- a/owl-bot-staging/VmMigration/v1/src/V1/resources/vm_migration_rest_client_config.php +++ /dev/null @@ -1,872 +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', - ], - ], - ], - ], - 'CancelDiskMigrationJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/diskMigrationJobs/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CancelImageImportJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/imageImports/*/imageImportJobs/*}: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', - ], - ], - 'CreateDiskMigrationJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/diskMigrationJobs', - 'body' => 'disk_migration_job', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'disk_migration_job_id', - ], - ], - 'CreateGroup' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/groups', - 'body' => 'group', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'group_id', - ], - ], - 'CreateImageImport' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/imageImports', - 'body' => 'image_import', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'image_import_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', - ], - ], - ], - ], - 'DeleteDiskMigrationJob' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/diskMigrationJobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteGroup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/groups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteImageImport' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/imageImports/*}', - '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', - ], - ], - ], - ], - 'ExtendMigration' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:extendMigration', - 'body' => '*', - 'placeholders' => [ - 'migrating_vm' => [ - 'getters' => [ - 'getMigratingVm', - ], - ], - ], - ], - 'FetchInventory' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{source=projects/*/locations/*/sources/*}:fetchInventory', - 'placeholders' => [ - 'source' => [ - 'getters' => [ - 'getSource', - ], - ], - ], - ], - 'FetchStorageInventory' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{source=projects/*/locations/*/sources/*}:fetchStorageInventory', - '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', - ], - ], - ], - ], - 'GetDiskMigrationJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/diskMigrationJobs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetGroup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/groups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetImageImport' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/imageImports/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetImageImportJob' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/imageImports/*/imageImportJobs/*}', - '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', - ], - ], - 'ListDiskMigrationJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/sources/*}/diskMigrationJobs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListGroups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/groups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'page_token', - ], - ], - 'ListImageImportJobs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/imageImports/*}/imageImportJobs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListImageImports' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/imageImports', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - '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', - ], - ], - ], - ], - 'RunDiskMigrationJob' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/sources/*/diskMigrationJobs/*}:run', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'StartMigration' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{migrating_vm=projects/*/locations/*/sources/*/migratingVms/*}:startMigration', - 'body' => '*', - 'placeholders' => [ - 'migrating_vm' => [ - 'getters' => [ - 'getMigratingVm', - ], - ], - ], - ], - 'UpdateDiskMigrationJob' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{disk_migration_job.name=projects/*/locations/*/sources/*/diskMigrationJobs/*}', - 'body' => 'disk_migration_job', - 'placeholders' => [ - 'disk_migration_job.name' => [ - 'getters' => [ - 'getDiskMigrationJob', - 'getName', - ], - ], - ], - ], - '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 7d7e69f67e4f..000000000000 --- a/owl-bot-staging/VmMigration/v1/tests/Unit/V1/Client/VmMigrationClientTest.php +++ /dev/null @@ -1,6847 +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 cancelDiskMigrationJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cancelDiskMigrationJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new CancelDiskMigrationJobResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/cancelDiskMigrationJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->diskMigrationJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DISK_MIGRATION_JOB]'); - $request = (new CancelDiskMigrationJobRequest()) - ->setName($formattedName); - $response = $gapicClient->cancelDiskMigrationJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->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/CancelDiskMigrationJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cancelDiskMigrationJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function cancelDiskMigrationJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cancelDiskMigrationJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->diskMigrationJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DISK_MIGRATION_JOB]'); - $request = (new CancelDiskMigrationJobRequest()) - ->setName($formattedName); - $response = $gapicClient->cancelDiskMigrationJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cancelDiskMigrationJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function cancelImageImportJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cancelImageImportJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new CancelImageImportJobResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/cancelImageImportJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->imageImportJobName('[PROJECT]', '[LOCATION]', '[JOB]', '[RESULT]'); - $request = (new CancelImageImportJobRequest()) - ->setName($formattedName); - $response = $gapicClient->cancelImageImportJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->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/CancelImageImportJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cancelImageImportJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function cancelImageImportJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cancelImageImportJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->imageImportJobName('[PROJECT]', '[LOCATION]', '[JOB]', '[RESULT]'); - $request = (new CancelImageImportJobRequest()) - ->setName($formattedName); - $response = $gapicClient->cancelImageImportJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cancelImageImportJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->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 createDiskMigrationJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDiskMigrationJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new DiskMigrationJob(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDiskMigrationJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $diskMigrationJobId = 'diskMigrationJobId1115031760'; - $diskMigrationJob = new DiskMigrationJob(); - $diskMigrationJobTargetDetails = new DiskMigrationJobTargetDetails(); - $targetDetailsTargetProject = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); - $diskMigrationJobTargetDetails->setTargetProject($targetDetailsTargetProject); - $targetDetailsTargetDisk = new ComputeEngineDisk(); - $targetDiskZone = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $targetDetailsTargetDisk->setZone($targetDiskZone); - $targetDiskDiskType = ComputeEngineDiskType::COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED; - $targetDetailsTargetDisk->setDiskType($targetDiskDiskType); - $diskMigrationJobTargetDetails->setTargetDisk($targetDetailsTargetDisk); - $diskMigrationJob->setTargetDetails($diskMigrationJobTargetDetails); - $request = (new CreateDiskMigrationJobRequest()) - ->setParent($formattedParent) - ->setDiskMigrationJobId($diskMigrationJobId) - ->setDiskMigrationJob($diskMigrationJob); - $response = $gapicClient->createDiskMigrationJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->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/CreateDiskMigrationJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDiskMigrationJobId(); - $this->assertProtobufEquals($diskMigrationJobId, $actualValue); - $actualValue = $actualApiRequestObject->getDiskMigrationJob(); - $this->assertProtobufEquals($diskMigrationJob, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDiskMigrationJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createDiskMigrationJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDiskMigrationJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $diskMigrationJobId = 'diskMigrationJobId1115031760'; - $diskMigrationJob = new DiskMigrationJob(); - $diskMigrationJobTargetDetails = new DiskMigrationJobTargetDetails(); - $targetDetailsTargetProject = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); - $diskMigrationJobTargetDetails->setTargetProject($targetDetailsTargetProject); - $targetDetailsTargetDisk = new ComputeEngineDisk(); - $targetDiskZone = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $targetDetailsTargetDisk->setZone($targetDiskZone); - $targetDiskDiskType = ComputeEngineDiskType::COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED; - $targetDetailsTargetDisk->setDiskType($targetDiskDiskType); - $diskMigrationJobTargetDetails->setTargetDisk($targetDetailsTargetDisk); - $diskMigrationJob->setTargetDetails($diskMigrationJobTargetDetails); - $request = (new CreateDiskMigrationJobRequest()) - ->setParent($formattedParent) - ->setDiskMigrationJobId($diskMigrationJobId) - ->setDiskMigrationJob($diskMigrationJob); - $response = $gapicClient->createDiskMigrationJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDiskMigrationJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->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 createImageImportTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createImageImportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $cloudStorageUri = 'cloudStorageUri1921455774'; - $name = 'name3373707'; - $expectedResponse = new ImageImport(); - $expectedResponse->setCloudStorageUri($cloudStorageUri); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createImageImportTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $imageImportId = 'imageImportId-677769711'; - $imageImport = new ImageImport(); - $request = (new CreateImageImportRequest()) - ->setParent($formattedParent) - ->setImageImportId($imageImportId) - ->setImageImport($imageImport); - $response = $gapicClient->createImageImport($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->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/CreateImageImport', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getImageImportId(); - $this->assertProtobufEquals($imageImportId, $actualValue); - $actualValue = $actualApiRequestObject->getImageImport(); - $this->assertProtobufEquals($imageImport, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createImageImportTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createImageImportExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createImageImportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $imageImportId = 'imageImportId-677769711'; - $imageImport = new ImageImport(); - $request = (new CreateImageImportRequest()) - ->setParent($formattedParent) - ->setImageImportId($imageImportId) - ->setImageImport($imageImport); - $response = $gapicClient->createImageImport($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createImageImportTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->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(); - $targetProjectProject = 'targetProjectProject2026784177'; - $targetProject->setProject($targetProjectProject); - $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(); - $targetProjectProject = 'targetProjectProject2026784177'; - $targetProject->setProject($targetProjectProject); - $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 deleteDiskMigrationJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDiskMigrationJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDiskMigrationJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->diskMigrationJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DISK_MIGRATION_JOB]'); - $request = (new DeleteDiskMigrationJobRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDiskMigrationJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->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/DeleteDiskMigrationJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDiskMigrationJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDiskMigrationJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDiskMigrationJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->diskMigrationJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DISK_MIGRATION_JOB]'); - $request = (new DeleteDiskMigrationJobRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDiskMigrationJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDiskMigrationJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->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 deleteImageImportTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteImageImportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteImageImportTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new DeleteImageImportRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteImageImport($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->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/DeleteImageImport', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteImageImportTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteImageImportExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteImageImportTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new DeleteImageImportRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteImageImport($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteImageImportTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->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 extendMigrationTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/extendMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ExtendMigrationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/extendMigrationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedMigratingVm = $gapicClient->migratingVmName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[MIGRATING_VM]'); - $request = (new ExtendMigrationRequest()) - ->setMigratingVm($formattedMigratingVm); - $response = $gapicClient->extendMigration($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->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/ExtendMigration', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getMigratingVm(); - $this->assertProtobufEquals($formattedMigratingVm, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/extendMigrationTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function extendMigrationExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/extendMigrationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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 ExtendMigrationRequest()) - ->setMigratingVm($formattedMigratingVm); - $response = $gapicClient->extendMigration($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/extendMigrationTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->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 fetchStorageInventoryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $resourcesElement = new SourceStorageResource(); - $resources = [ - $resourcesElement, - ]; - $expectedResponse = new FetchStorageInventoryResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResources($resources); - $transport->addResponse($expectedResponse); - // Mock request - $formattedSource = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $type = StorageType::STORAGE_TYPE_UNSPECIFIED; - $request = (new FetchStorageInventoryRequest()) - ->setSource($formattedSource) - ->setType($type); - $response = $gapicClient->fetchStorageInventory($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResources()[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/FetchStorageInventory', $actualFuncCall); - $actualValue = $actualRequestObject->getSource(); - $this->assertProtobufEquals($formattedSource, $actualValue); - $actualValue = $actualRequestObject->getType(); - $this->assertProtobufEquals($type, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function fetchStorageInventoryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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]'); - $type = StorageType::STORAGE_TYPE_UNSPECIFIED; - $request = (new FetchStorageInventoryRequest()) - ->setSource($formattedSource) - ->setType($type); - try { - $gapicClient->fetchStorageInventory($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 getDiskMigrationJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new DiskMigrationJob(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->diskMigrationJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DISK_MIGRATION_JOB]'); - $request = (new GetDiskMigrationJobRequest()) - ->setName($formattedName); - $response = $gapicClient->getDiskMigrationJob($request); - $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/GetDiskMigrationJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDiskMigrationJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->diskMigrationJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DISK_MIGRATION_JOB]'); - $request = (new GetDiskMigrationJobRequest()) - ->setName($formattedName); - try { - $gapicClient->getDiskMigrationJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 getImageImportTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $cloudStorageUri = 'cloudStorageUri1921455774'; - $name2 = 'name2-1052831874'; - $expectedResponse = new ImageImport(); - $expectedResponse->setCloudStorageUri($cloudStorageUri); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new GetImageImportRequest()) - ->setName($formattedName); - $response = $gapicClient->getImageImport($request); - $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/GetImageImport', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getImageImportExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new GetImageImportRequest()) - ->setName($formattedName); - try { - $gapicClient->getImageImport($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getImageImportJobTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $cloudStorageUri = 'cloudStorageUri1921455774'; - $name2 = 'name2-1052831874'; - $expectedResponse = new ImageImportJob(); - $expectedResponse->setCloudStorageUri($cloudStorageUri); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->imageImportJobName('[PROJECT]', '[LOCATION]', '[JOB]', '[RESULT]'); - $request = (new GetImageImportJobRequest()) - ->setName($formattedName); - $response = $gapicClient->getImageImportJob($request); - $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/GetImageImportJob', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getImageImportJobExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->imageImportJobName('[PROJECT]', '[LOCATION]', '[JOB]', '[RESULT]'); - $request = (new GetImageImportJobRequest()) - ->setName($formattedName); - try { - $gapicClient->getImageImportJob($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 listDiskMigrationJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $diskMigrationJobsElement = new DiskMigrationJob(); - $diskMigrationJobs = [ - $diskMigrationJobsElement, - ]; - $expectedResponse = new ListDiskMigrationJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDiskMigrationJobs($diskMigrationJobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->sourceName('[PROJECT]', '[LOCATION]', '[SOURCE]'); - $request = (new ListDiskMigrationJobsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDiskMigrationJobs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDiskMigrationJobs()[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/ListDiskMigrationJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDiskMigrationJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = 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]'); - $request = (new ListDiskMigrationJobsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDiskMigrationJobs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 listImageImportJobsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $imageImportJobsElement = new ImageImportJob(); - $imageImportJobs = [ - $imageImportJobsElement, - ]; - $expectedResponse = new ListImageImportJobsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setImageImportJobs($imageImportJobs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new ListImageImportJobsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listImageImportJobs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getImageImportJobs()[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/ListImageImportJobs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listImageImportJobsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->imageImportName('[PROJECT]', '[LOCATION]', '[JOB]'); - $request = (new ListImageImportJobsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listImageImportJobs($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listImageImportsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $imageImportsElement = new ImageImport(); - $imageImports = [ - $imageImportsElement, - ]; - $expectedResponse = new ListImageImportsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setImageImports($imageImports); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListImageImportsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listImageImports($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getImageImports()[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/ListImageImports', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listImageImportsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = 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 ListImageImportsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listImageImports($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $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 runDiskMigrationJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/runDiskMigrationJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new RunDiskMigrationJobResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/runDiskMigrationJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->diskMigrationJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DISK_MIGRATION_JOB]'); - $request = (new RunDiskMigrationJobRequest()) - ->setName($formattedName); - $response = $gapicClient->runDiskMigrationJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->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/RunDiskMigrationJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runDiskMigrationJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function runDiskMigrationJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/runDiskMigrationJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal 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->diskMigrationJobName('[PROJECT]', '[LOCATION]', '[SOURCE]', '[DISK_MIGRATION_JOB]'); - $request = (new RunDiskMigrationJobRequest()) - ->setName($formattedName); - $response = $gapicClient->runDiskMigrationJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/runDiskMigrationJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->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 updateDiskMigrationJobTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDiskMigrationJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new DiskMigrationJob(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDiskMigrationJobTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $diskMigrationJob = new DiskMigrationJob(); - $diskMigrationJobTargetDetails = new DiskMigrationJobTargetDetails(); - $targetDetailsTargetProject = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); - $diskMigrationJobTargetDetails->setTargetProject($targetDetailsTargetProject); - $targetDetailsTargetDisk = new ComputeEngineDisk(); - $targetDiskZone = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $targetDetailsTargetDisk->setZone($targetDiskZone); - $targetDiskDiskType = ComputeEngineDiskType::COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED; - $targetDetailsTargetDisk->setDiskType($targetDiskDiskType); - $diskMigrationJobTargetDetails->setTargetDisk($targetDetailsTargetDisk); - $diskMigrationJob->setTargetDetails($diskMigrationJobTargetDetails); - $request = (new UpdateDiskMigrationJobRequest()) - ->setDiskMigrationJob($diskMigrationJob); - $response = $gapicClient->updateDiskMigrationJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->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/UpdateDiskMigrationJob', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDiskMigrationJob(); - $this->assertProtobufEquals($diskMigrationJob, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDiskMigrationJobTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateDiskMigrationJobExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDiskMigrationJobTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $diskMigrationJob = new DiskMigrationJob(); - $diskMigrationJobTargetDetails = new DiskMigrationJobTargetDetails(); - $targetDetailsTargetProject = $gapicClient->targetProjectName('[PROJECT]', '[LOCATION]', '[TARGET_PROJECT]'); - $diskMigrationJobTargetDetails->setTargetProject($targetDetailsTargetProject); - $targetDetailsTargetDisk = new ComputeEngineDisk(); - $targetDiskZone = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $targetDetailsTargetDisk->setZone($targetDiskZone); - $targetDiskDiskType = ComputeEngineDiskType::COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED; - $targetDetailsTargetDisk->setDiskType($targetDiskDiskType); - $diskMigrationJobTargetDetails->setTargetDisk($targetDetailsTargetDisk); - $diskMigrationJob->setTargetDetails($diskMigrationJobTargetDetails); - $request = (new UpdateDiskMigrationJobRequest()) - ->setDiskMigrationJob($diskMigrationJob); - $response = $gapicClient->updateDiskMigrationJob($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDiskMigrationJobTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->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(); - $targetProjectProject = 'targetProjectProject2026784177'; - $targetProject->setProject($targetProjectProject); - $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(); - $targetProjectProject = 'targetProjectProject2026784177'; - $targetProject->setProject($targetProjectProject); - $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()); - } -}